Sync recursively to a folder in a B2 bucket


I have approximately 160,000 files of about 2.9TB in a BackBlaze B2 bucket. Unfortunately, some time ago I used a program called ChronoSync running on a Mac Pro to sync these files from a FreeNAS machine to our B2 bucket. When we set up ChronoSync, we created a root-level folder called FreeNAS and copied files to that folder. We realized some time later that it was best to run the sync on the FreeNAS system instead of the Mac Pro in order to free up the Mac for other functions.

So we installed rclone and configured it for use with B2 bucket. I am finding that most rclone sync commands do not incorporate folders in their instruction. I.e.

rsync sync --fast-list --min-age 15 --transfer 16 --copy-links /mnt/storage b2-backup:DawnSign-0001/FreeNAS

The above command results in all files being copied to the FreeNAS folder instead of coping over the existing folder hierarchy as it exist on the FreeNAS system.

What is the correct way to sync it to a folder in a B2 bucket that preserves the hierarchy of folders?


Rclone syncs directories to directories, so here

It syncs the storage directory with the FreeNAS directory so the directory tree under storage will be replicated under FreeNAS.

I’m unsure exactly what you require; can you give an example of a file and where you’d like it to go and where it is going?