Rclone sync can I exempt a folder on the remote?

Is it possible to designate a folder on the remote as being exempt from a sync operation?

I basically have a situation there I have two clients backing up to one remote (phone and computer). Here is the workflow:

  1. I am using RCX (rclone Android App) to back up data and apps from my phone to a folder in my remote:

remote:/Android Backups

  1. I am backup up data from my computer to the same remote.

remote:/All other folders

I can't use copy because all of the other folders need to be synced and updated.

I can't use sync because it will delete my Android Backups folder as this folder doesn't exist on my computer and I do not need this folder on my computer.

Is there a way to accomplish this goal?

why not create another folder in root such as remote:computer
then sync your computer to that?

I already have a lot of structure, work and time put into remote:/everything else. I would like to leave it is possible.

I just found out that I can put a folder exemption in my sync command and even though that folder doesn't exist on the source it seems to exempt that folder on the remote destination:

--exclude "/Backups Android/"

Do you know if this will actually work?

Yes, that should work - excludes work on the source and the destination.

It won't get deleted unless you pass the --delete-excluded so do not use this flag!

Try first with the -i or --dry-run flag.

for what it worth, running a sync based backup of critical files, on a destination arranged like that is not the way to go.
if you tweak the script and make a typo you could lose all your backup files.
and you might not even notice it for weeks, and you get hit with ransomware, now you try to get those backups files from cloud, and they are not there or you have overwritten the android files.

i would do a one-time move of existing files to remote:computer.
if you do not want to do that, i would use --backup-dir which also protects against ransomware.

rcx has known bugs, i have been in contact with the author, who is very nice. but the software has not been updated in five months.

did you know you can run rclone on android?
here is a wiki i wrote about it
https://github.com/rclone/rclone/wiki/turn-your-android-phone-into-a-media-server

I second that, although --suffix could be used together with --backup-dir, otherwise the backup might be corrupted in a ransomware sitation on next sync.

As RCX/Termux maintainer/contributor, I'm also going to link to this post from ncw on how use rclone with Termux to schedule your backups. Unlike RCX, the Termux version is rarely out of date. It will be a while until RCX has caught up, I'm currently still busy with university stuff due to corona.

1 Like

hi @x0b, hope all is well. if/when you update rcx, you can start a new post in this forum, asking for beta testers. thanks

as for ransomware, using suffix, will create large folders and many cloud providers have issues with that.
also, since i crypt my rclone folders. i like to use mount when i need to recover an archived file. mount with huge folders also creates performance problems.

so i do a forever-forward-incremental-backup using --backup-dir and date+time stamp.

rclone.exe sync "b:\en07.veaamfull" wasabieast2:vserver03\en07.veaam\rclone\backup --backup-dir=wasabieast2:vserver03\en07.veaam\rclone\archive\20201025.093621
1 Like

Thanks for all the great and thoughtful info.

How will --backup-dir help protect me against ransomware, this sound intriguing.

I really like RCX as well, I haven't noticed any show stopping bugs so far that might compromise my data, are you aware of any?

I am trying to use rclone Browser on Linux as well and it is full of bugs. Much of the GUI is broken, some of it might be due to rclone changing output and the GUI can't parse it properly. I don't think it has been updated in over a year.

I did not know I could use rclone on Android, I will check out your link. Thanks.

there is more than one version, this one is used by many on the forum including me on both windows and linux.
https://kapitainsky.github.io/RcloneBrowser/

let's look at two commands
rclone sync /path/to/local remote:computer/backup

  1. first run, rclone will copy all files from /path/to/local to remote:computer
  2. a local file has been edited.
  3. second run, rclone will need to upload the local file from /path/to/local to remote:computer but there is an older version of that local file already in remote:computer.
  4. rclone will delete the file in remote:computer
  5. rclone will copy the local file from /path/to/local to remote:computer
    the result, the older file in the remote:computer deleted.

rclone sync /path/to/local remote:computer/backup --backup-dir=remote:computer/archive/20201025

  1. first run, rclone will copy all files from /path/to/local to remote:computer/backup
  2. a local file has been edited.
  3. second run, rclone will need to upload the local file to /path/to/local to remote:computer/backup but there is an older version of that local file already in remote:computer/backup.
  4. rclone will move the existing file from remote:computer/backup to remote:/computer/archive/20201025
  5. rclone will copy the local file from /path/to/local to remote:computer/backup
    the result, the older file is not deleted

Yes this is the one I am trying to use as well however there is no option to use logging. If you try to use the --log-file option it breaks the GUI. The app can't parse the output from progress and update the fields properly.

I have setup a bunch of jobs and I would like to use Rclone Browser but this is a deal breaker for me. I can't see using rclone without a log file to check for errors and other unexpected situations and to have a record for data integrity. It would feel like jumping without a parachute. Have you been able to get logging working with rclone Browser or do you have another use case for rclone browser that doesn't involve logging?

i really do not use it much, sometimes, if i need to do a one-time copy/move and for each job, it has a output window.
i use rclone for backups and always use a debug log and then parse that debug log.

Yes, we are on the same page. I almost never run with a debug log. I want to know exactly what is going on and review everything. The concept of the rclone GUI is nice. I can save and update all my jobs and view the transfers in a very nicely organized window but I am not going to use it until logging works.

Thanks for your earlier advice on splitting out my backups at the root level by device. As you suggested, I am going to use the rclone move command to move all of my top level folders to rclone:Computer then make an rclone:Android.

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