Basic help on backup-dir & filter_file

Hi everyone,

Hope this is of help to someone else out there too. I am new to rclone and have some basic understanding of the commandline but had been banging my head against the commandline prompt for the past 2 hours… I had setup rclone config successfully and was able to do basic backups but am running into issues with these two flags below. Any guidance / help will be much appreciatedPreformatted text!

[Backup-Dir]
rclone copy "c:\My_Documents" "crypt:" --backup-dir "crypt:/sessions/[dynamic date from cmd]/"

Am I missing something here? From logs, it keeps telling me that the destination and backup cannot overlap. For what it’s worth, “Crypt” is encrypted and maps to a rclone-backup/ folder on ACD.

[Filter File]
in the above command, I had pointed rclone to c:\My_Documents but I had really only wanted 3 folders within that directory (and also exclude some sub-folders in Folder A). Is the right way to do this by putting down the following in the filter_file?

+ c:\My_Documents/Folder_A/**
+ c:\My_Documents/Folder_B/**
+ c:\My_Documents/Folder_C/**
- c:\My_Documents/**
- c:\My_Documents/Folder_A/Sub-FolderA1/

Expected output on “crypt:” when I do a “ls”
‘Folder_A/ shows this folder and also everything inside it EXCEPT Sub-FolderA1
Folder_B/ shows this folder and also everything inside it
Folder_C/ shows this folder and also everything inside it’

The destination that you are putting your backups in is in fact included in the files you are trying to copy. You can’t do that. This would work, however:

rclone copy “c:\My_Documents” “crypt:My_Documents/” --backup-dir “crypt:/sessions/[dynamic date from cmd]/”

I believe the following is what you want as far as order. I am not sure about syntax though for windows paths. The filter works from top to bottom and stops for each file on a match. If the Sub-FolderA1 was below the Folder A then it would have already matched that line and be included.

  • c:\My_Documents/Folder_A/Sub-FolderA1/
  • c:\My_Documents/Folder_A/**
  • c:\My_Documents/Folder_B/**
  • c:\My_Documents/Folder_C/**
  • c:\My_Documents/**
1 Like