On 2018-01-11 19:51, jdd@dodin.org wrote:
Le 11/01/2018 à 19:24, Bernhard Voelker a écrit :
I would like to use the --delete option, because I may remove old files on source
The --delete option does not delete on SRC side, but would remove files/directories on the DST side if the file does not exist on SRC side.
exactly. I often find duplicates an want to remove the from all archives (I have several copies of the archives, some older than others)
I don't think you understand the --delete action. The intention is that you do a copy, say from a directory to a memory card. Some days later you repeat the same operation: same directory and same card. Well, the --delete option will delete on the backup the files that are no longer in the original. Also, if you make a mistake and put the wrong memory card (a backup of another directory), it will delete the complete card. For example, you backup "photos" to card A, and "taxes" to card B. If another day you use rsync with --delete of "photos" to card B, then card B is deleted and you lose the backup of the taxes. So be very careful with --delete. Happened to me.
the folder I want to archive I name "mes-documents" (my-docs in french) and I drop them where I need them.
I would like to use rsync to sort them by date while keeping the directory structure.
Say, I have somewhere a folder "taxes" and I want to archive them as taxes from 2000 to 2010 for example
I don't see how to sort by date with rsync, but perhaps. Me, I would perhaps create a secondary tree of hardlinks of the files sorted by date, then backup that. Hard links do not use extra space. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)