I have an nfs device that creates checkpoint (backups) everyday. I want to use Rsync to copy these checkpoints to another device (Drobo connected via iSCSI). So I've run the script on a single nfs share and it works nicely. Here are a couple concerns I have that will take too long to experiment with multiple times.
There are multiple shares to back up, and I would like to loop through them and run the script over each one. How will this work with Rsync? Will the Rsync job start and then loop again and run a second and third and fourth Rsync job simultaneously, or will Rsync wait for the job to finish before ending and restarting the loop? Maybe I just need to put some check in the loop to not restart until Rsync is done.
Referring to that last sentence; what does Rsync return that I could use to report if there was an error or continue the loop if all went well?
The checkpoints created by the NFS device are named based on the date. Rsync is unpacking the .ckpt* file into a statically named directory. Since the source is a different directory but the files inside are the same, and the target is named the same, will Rsync still only copy the differences?
this is the rsync job:
rsync -az $NEWCHKPT/* /drobo/bak.${share}/${share}_daily
I know this is post is asking alot. Any advice is greatly appreciated.
if rsync ...; then echo "rsync succeeded"; else echo "rsync failed"; fi
. If you want to distinguish between the different types of failures, you want to copy the?
parameter right after the rsync command.rsync ...; status=$?; if (( status == 11 )); then echo "bla bla"; elif (( status == 12 )); then echo "other bla"; fi
– geirha May 15 '13 at 16:51