[PLUG] Cron advice needed

John Jason Jordan johnxj at comcast.net
Tue Apr 26 23:05:10 UTC 2016


On Tue, 26 Apr 2016 11:53:52 -0700
Paul Mullen <pm at nellump.net> dijo:

>This is a job for rsync, anyhow.  The following command should do
>exactly what you want:
>
>  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.
>
>rsync has a dry run mode that will show you the changes it would
>normally perform without actually making any.  Just add the "-n"
>option to the command line.

I thought of rsync too, but the advice from the Claws-Mail listserve
included the cp command, so that's what I used. 

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

I have a couple dozen folders where I store mails that I want to save.
However, I leave mail in the Inbox until the thread has exhausted
itself, and then, if I think I want to save the thread for future
reference, I move it manually to one of my storage folders. If I don't
want to save it I just delete the mails from my Inbox. Either way, those
mails are no longer in the Inbox, so I don't want them populating my
backup Inbox. Otherwise the backup Inbox is going to end up with many
thousands of mails in it. And if I needed to restore my Inbox I'd never
be able to figure out which ones of the thousands to restore.

And the same thing will happen with my storage folders. I don't delete
mails from them as much, but occasionally I do a housekeeping and throw
out stuff that I think I will never need again. I don't want them to
keep growing until they choke my backup into uselessness.

I might be able to figure out how to change the command to accomplish
what I want, but I'm scared of rsync and its man page. :(



More information about the PLUG mailing list