[PLUG] Cron advice needed

John Jason Jordan johnxj at comcast.net
Wed Apr 27 02:56:14 UTC 2016


On Tue, 26 Apr 2016 16:22:45 -0700
David <dafr+plug at dafr.us> dijo:

>>>   rsync -avx /home/jjj/Mail/ /media/jjj/Data/Mail
>>>
>>> Don't remove the trailing slash on the source path.  It tells rsync
>>> to copy the contents of /home/jjj/Mail to /media/jjj/Data/Mail/, as
>>> opposed to creating a new Mail dir under /media/jjj/Data/Mail/
>>> (i.e., /media/jjj/Data/Mail/Mail).  The rsync man page has more
>>> details under the "Usage" section.

>> The above command works, except that it does not remove mails from
>> the backup that have been deleted from the source.

>You probably would benefit from the --delete flag. From the man page, 
>this flag will "delete extraneous files from dest dirs" which I
>believe is what you want to accomplish.

OK, I changed it to:

	rsync -avx --delete /home/jjj/Mail/ /media/jjj/Data/Mail

And it seems to be working. 



More information about the PLUG mailing list