How can i sync content from a text file with its path?

Hi there. I made a script that puts the path of the content i’m interested in backing up, then rsync copies them to a backup folder and then to the cloud with gsutils. Now i want to have rclone skip the copying part and go straight ahead by reading that file and syncing.

Is this possible? Tried something like:

rclone sync --include-from /media/Multimedia/files_dirs_backup.txt backup:backup_bucket/Destination_Folder --dry-run and says i need 2 arguments, undoubtly the source, but i want rclone to pickup the files from the file.

Perhaps i’d make a script to read line by line and then execute rclone sync for each one?

If you just have source file paths, use --files-from. This is one file per line rooted at the sync root.

So let’s say you had /home/me/file1 and /home/me/file2 to transfer, you would do

rclone sync --files-from files.txt /home/me backup:wherever

Where files.txt would contain

file1
file2

This is explained in detail here: https://rclone.org/filtering/#files-from-read-list-of-source-file-names