On 01/15/2018 12:23 PM, jdd@dodin.org wrote:
Le 15/01/2018 à 11:29, Bernhard Voelker a écrit :
you have blanks and other special characters in file names. The only safe way to handle this between tool is to use NUL-terminated strings.
hope it solve this part of the problem, but not all:
./culte/mulet-reborn.bk/etc/init.d/nmbln: failed to create hard link '/data-ssd480/tmp/./culte/mulet-reborn.bk/etc/init.d/nmb' => './culte/mulet-reborn.bk/etc/init.d/nmb': No such file or directory
I think the problem come from the "/./" in the middle. This come from find issuing ./ on the beginning of every result?
no, the problem is: "Not such file or directory" In the above context, I would think that ln did not find the file on the source tree.
the blank spaces in filesnames are also a problem, mostly because there may also b single qotes in them (they are french books names, created by calibre)
shouldn't be a problem (with correct quoting the file names).
I'm surprised why so many guys here suggest creating a hierarchy with hardlinks with the files falling in the year range. Well, you could also store it in a database, or write it on a paper and send it around the world before processing further. ;-)
the problem is the use of the --delete option.
I want to be able to update the target from time to time and have it identical to the source. If a file is deleted from the source, it have to be also deleted from the target also. this should be allowed if the hard links folder have only the desired files
...
I want to keep all the files on the source and use several sd cards as target, each with different times
ah, you want a repeatable script which manages the backup/sync/delete. Hmm, in that case having a "shadowed" tree with hardlinks might be okay: 1. create the hardlinks in a per-year directory tree. - remove all files from the hardlink-tree which have a link count of 1 (these are files which have been deleted from the source tree): $ find path-to-hardlink-tree -type f -link 1 -delete - invoke rsync with --delete. Well, depending on your data, you might get "filesystem full" errors when writing to the SD card, but you can think about it when that day comes. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org