Re: rsync

John Hanley
 

Replying to a three year old thread as I am setting up my back up utility again.

Is there a reason you don’t use —delete in your rsync?

It seems that if you alter your directory and then rsync, the deleted file remains in your backup. I see cautions in the man page for rsync on —delete. Is it somehow dangerous?

Thanks!
John


On Wed, Mar 8, 2017 at 9:38 PM mward <mward@...> wrote:

> What is/are the best options(s) for rsync? I seem to recall using -a 
> previously.

I like to use:

rsync -av --stats $SRC $DST >> $LOGFILE

After a run you can see what happened, useful if there are errors. 
'--stats' gives a nice summary of how many files xferred, how long it 
took, etc. Give it a test run with:

rsync -avn --stats $SRC $DST >> $LOGFILE

> a weekly basis, will that be any better/worse than setting it in 
> crontab to backup music on Mondays, photos on Tuesdays, /home on 
> Wednesdays at different times of the day?

Not really, considered in the long-term. It means each individual 
backup job will take less time - that might be an advantage in certain 
circumstances, e.g. to avoid a conflict with other services.

--
**********************************************
 Michael Ward
 http://www.mward.ca
**********************************************




Join elug@groups.io to automatically receive all group messages.