Sync but only for a specific list of files

What is the problem you are having with rclone?

rclone is running slowly. Is it possible to run rclone sync but on a specific list of files (rather than a whole directory)? That is, I would check for files on my system that have been modified since I last ran rclone; and have rclone just sync those files (along the accompanying path). Currently, rclone is checking a hash for every file in my directory against every file in my target directory (Google Drive). That's often overkill since if I've usually only modified a few files since I last ran rclone. Thank you.

What is your rclone version (output from rclone version)

rclone v1.52.2
- os/arch: linux/amd64
- go version: go1.14.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 18.04, 64 bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync [my_directory] Gdrive:[My_GoogleDrive_Directory] --progress

The rclone config contents with secrets removed.

Name                 Type
====                 ====
GDrive               drive

A log from the command with the -vv flag

[N/A because I am not getting any errors.]

you can use rcloen filtering to target specific files only.

You can use age to have it only sync certain files based on age:

  --max-age Duration                     Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
  --min-age Duration                     Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)

You can also do syncs based on just size or presence with flags as well. Not knowing your use case, not sure if these are for you.

For example:

--size-only

1 Like

You can use --files-from or --files-from-raw to specify just a lit of files if you want to tell rclone exactly what to do.

You may also want to consider some other flags to speed it up like --no-traverse or --no-check-dest but they have their pros and cons so read the documentation carefully

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.