rsync question

Dart

Active Member
Joined
Jan 5, 2022
Messages
113
Reaction score
134
Credits
1,200
Hello,

I'm working on getting backup files from remote hosts. They are all in the same folder structure. (yes some are in sub-folders) I spent most of yesterday searching rsync threads for examples of using the find command embedded in the rsync command. However the all are for sending local files to a remote computer. I need the reverse.
What I fear is that embedding the find command in the rsymc command won't work due to the fact that their are sub-folders that 'can' contain valid backup files. This seems to be the case as I have two sets of hosts. On one set of hosts, the backups are all in one folder, the other the could be in sub-folders.

Here's what I have, a bit kludgy but it does work.

ssh $IP 'find /$remote_folder/ -type f -mtime '$newer_then'' > "$f_list" if [ ! -z "$f_list" ] then cat "$f_list" | while read file do $RSYNC $ROPT --protocol=$PROTO $IP:$file /$local_folder/$SITE/$folder/ done fi

If this is the final solution, I'm good with it. Just wondering if anyone has any ideas.

Thanks!
 
Last edited:

Staff online

Members online


Top