I wanted to copy files that are made 15 and more days ago. Here is the code im currently using

rsync -RDa0P \
    --files-from=<(find /vmail/folder1/ -mtime +15 -print0) \
    . [email protected]:/vmail/folder1/

The find part did show all the files:

/vmail/folder1/folder11/file15,
/vmail/folder1/folder11/file16

but when the code above is issued, it gives an error failed: No such file or directory (2). And the directory was changed, root was added :

rsync: link_stat "/root/vmail/folder1/folder11/cur/ failed: No such file or directory (2)"

Am i missing something? Any help is appreciated!


Solution 1:

-R is for relative path name.

You are probably in the /root directory, adapt your command or move to /