How to restore the most recent version of several files without changing the name

Hello guys

I'm pretty new using rclone and looking for some help. Maybe some can tell me the right command to do what I like to or point me into the right direction...

I backup several files from my server with rclone to an s3-service (which is using versioning).
Now I would like to restore a couple of files, filtered by some parameters:

  • File-Path / Names (I already did that with a filter-file)
  • Presenting only the most recent version of each file (optional: which is at least x days old) (optional: even consider deleted files)

The files should be transfered back to the server, keeping the original file-name and path (and not adding the version-date/time at the end).

Run the command 'rclone version' and share the full output of the command.

rclone v1.63.0

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-76-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.5
  • go/linking: static
  • go/tags: none

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

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

rclone --s3-versions copy IDriveE2:xxx/ --include "filelist.txt" "./restorebackup" -P

The command above works pretty well, but does not have the disired filtering options nor does it not alter the filename.

Can anyone help me out? Thanks for the help and best regards!

As per docs.

You could use --s3-version-at flag.

For example to restore file as it was on given date:

rclone copy IDriveE2:xxx/  "./restorebackup" --s3-version-at "2022-05-20 00:00:00" --include "filelist.txt"  -P

test how it works with:

rclone ls IDriveE2:xxx/ --s3-version-at "2022-05-20 00:00:00"

1 Like

For multiple files use --include-from filelist.txt

where filelist.txt:


Thank you so much, I was looking for exactly this command!

1 Like

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