Doubt about --backup-dir for entire directory

Hi :slight_smile:

This is probably something easily doable with a script but maybe there is a way.

I know i can use --backup-dir and --suffix but for my understanding these works for files.

If i copy a folder to a remote, can i move the previous folder that was on the remote with --backup-dir?

For example i backup my thunderbird profile. If i backup the profile again i would like to move the existing one (preferably within the same folder structure) in the --backup-dir=DIR.

Using --backup-dir could result complex when i want to restore the profile because i have to pick the files here and there.

Is this possible? Or i have to do this in two commands?

Hope it's clear, thanks in advance!


each time you upload the folder, put it into its own folder using a timestamp, then no need for --backup-dir
rclone copy /path/to/thunderbird/ remote:thunderbird/2020.12.21

also, i have a script that will zip a local folder, like my firefox profile, firefox.2020. and upload that single file.

1 Like

This is a great solution thanks!

Are you on Windows? You could maybe share the parameters used for the 7zip script you used?

Thanks again!

yes, i am on windows.
i have a python script that runs rclone, 7zip, fastcopy and enables VSS as the source.

this could create the .7z
@set ZipCmd=C:\data\rclone\scripts\7za.exe a "a:\firefox\zip\firefox.20201219.124054.7z" "b:\mount\rcloner\firefox_20201219.124054\data\C\firefox\6f95nzz4.default\" -p%zp% -bb1 -ms=off -x!6f95nzz4.default\cache2\ -x!6f95nzz4.default\crashes\ -x!6f95nzz4.default\storage\ -x!6f95nzz4.default\safebrowsing\ -x!6f95nzz4.default\minidumps\
and this would upload it.
@set RcloneSyncZipCmd=C:\data\rclone\scripts\rclone.exe sync "a:\firefox\zip\firefox.20201219.124054.7z" "wasabi01:en07/firefox/zip/backup" --stats=0 --fast-list --log-level=DEBUG --log-file=C:\data\rclone\logs\firefox\20201219.124054\rclone.log

1 Like

Thanks! :smiley:

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