i have been experimenting with accessing a remotely stored borg repo. since these repos can get fairly large, i would like to be able to fully access backup data using only an rclone remote storage.

there is currently a question on the borg issues page asking about a similar setup, but i couldn't find much details anywhere else. especially with trying to improve the performance.

setup

currently, i have an rclone remote for GDrive, let's call it Drive:. in Drive:backups/borg, there is a mirrored borg repo.

i would like to be able to browse this borg repo.

first, i create a cache remote, named DriveCache: in rclone to improve performance. i used the default settings, but set the chunk quota to 10 GB because i had the storage to spare.

next, i use rclone mount using its own vfs caching options.

this looks like:

rclone mount -vP --vfs-cache-mode writes DriveCache:backups/borg ~/mounts/borg_remote

next, in another shell, i ran borg info to see if the repository could be accessed. it was able to provide the repo statistics! i hope mounting will work as well.

according to the issue (see earlier), weird errors happen unless we pass --foreground to borg mount. i ran the command:

borg mount --foreground ~/mounts/borg_remote ~/mounts/borg_mount

once again, this takes up another shell. i opened yet another shell to check whether we can access the mounted repo:

ls ~/mounts/borg_mount

and sure enough, it works!

experience

now that it is mounted, i want to see how usable it is. since it is remote there is a good chance that it will be very unresponsive and slow and may be something of a pain to work with.

the very first thing i noticed even trying to change dir to my mount was that the zsh prompt hanged (probably while loading directory info, quite possibly has something to do with git integration in my shell prompt)

i tried browsing using ranger, but gave up quickly after waiting two minutes and still seeing that it was loading. next, i tried listing a particular backup's directory. even this ended up taking upwards of thirty seconds the first time. however, the second time i ran the command, it was fast again, probably due to caching.

encouraged by this, i gave ranger another try. this time, it does load successfully. surprisingly, all directory browsing ended up being somewhat snappy. maybe something triggered recursive exploration, slowing the programs down, but then ultimately caching the results?

conclusions

using borg to access a remotely stored repository via rclone provides a somewhat usable experience. the tools themselves work correctly for the most part when configured with caching, but as expected, navigation can be slow until caching kicks in.