We're currently using rsync
to run a backup job. This job takes several hours. As there are some parts of the backup that are more important than others, we would like to ensure that they are backed up before everything else (i.e. that rsync
transfers those files first). This should be easily accomplished using rsync --files-from
.
Unfortunately, the files that we need to prioritise are alongside all of the other files in a single directory (flat hierarchy, boo!), they just have a specific extension to identify them. As such, we'd like to get a list of the files that rsync
would transfer, sort it locally and then pass it to rsync
using rsync --files-from
.
Using rsync -v --dry-run
gets us most of the way there (I think), but displays directory-additions and file property changes, meaning we don't really get an immediately usable list.
So, my question is this: how can I get a list of files to use from rsync?