I set up this crontab that would sync my LP's folder on SDA2 to my LPs folder on SDB1, my external USB drive. My drive partition is 45GB. When my crontab runs every hour it is copying files to my 45GB partition instead of my external USB drive therefore filly up my drive partition and leaving me with a drive that is totally full. What am I doing wrong? All I want to do is have a copy of my sda2/LPs folder for safekeeping. I'm in the process of digitizing all my records albums (around 5000). Big job. And what I love is that I am using Puppy as my main OS distro to do this!
I'm using a full install of Lucid 5.2.8
rsync -r -t -p -o -g -v --progress --delete -s /mnt/sda2/LPs/ /mnt/sdb1/LPs
Crontab not saving to external drive
from man file using --delete is tricky
Beginning with rsync 3.0.0, the recursive algorithm used is now an
incremental scan that uses much less memory than before and
begins the transfer after the scanning of the first few directories
have been completed. This incremental scan only affects our
recursion algorithm, and does not change a non-recursive transfer.
It is also only possible when both ends of the transfer are at least
version 3.0.0.
Some options require rsync to know the full file list, so these options
disable the incremental recursion mode. These include:
--delete-before, --delete-after, --prune-empty-dirs, and
--delay-updates. Because of this, the default delete mode
when you specify --delete is now --delete-during when both
ends of the connection are at least 3.0.0 (use --del or
--delete-during to request this improved deletion mode explicitly).
See also the --delete-delay option that is a better choice than using --delete-after.
Thanks don570!
So you think it is the delete option that is causing problems? All I want is for both folders to be the same. If a file is deleted in folder one, then folder two should reflect the change as an example. But what I don't get is why it is synching to my drive partition instead of to my usb device. My drive partition is 45GB. The folder I am syncing is over 100GB. It seems that instead of syning to my usb drive it's somehow syncing back to my drive partition.
So you think it is the delete option that is causing problems? All I want is for both folders to be the same. If a file is deleted in folder one, then folder two should reflect the change as an example. But what I don't get is why it is synching to my drive partition instead of to my usb device. My drive partition is 45GB. The folder I am syncing is over 100GB. It seems that instead of syning to my usb drive it's somehow syncing back to my drive partition.
Are you sure the USB drive is being mounted before rsync is run? If nothing has been mounted at /mnt/sdb1 it is just another directory in the same partition in which the /mnt/ directory lives, so any files copied to it will take up space in that partition.rmcellig wrote:But what I don't get is why it is synching to my drive partition instead of to my usb device.