brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: a read only rclone mount lets you browse a cloud remote safely

Rclone
~/tips/tip-rclone-mount-read-only

rclone mount remote:backup ~/restore --read-only

Opens a cloud remote as a folder without any risk of changing it.

When you want one file back from a cloud backup, browsing beats guessing paths. Mount the remote as a folder, and make it read only.

Create an empty directory and mount onto it:

mkdir -p ~/restore
rclone mount remote:backup ~/restore --read-only

The command stays in the foreground, so open a second terminal or your file manager, find what you need and copy it out. Press Ctrl+C when you’re done. If you add --daemon it goes to the background and you unmount it yourself, with fusermount -u ~/restore on Linux (fusermount3 on some systems) or umount ~/restore on a Mac.

The --read-only flag is why I like this for restores. A stray drag in a file manager can’t move or delete anything in the only copy you have.

You need FUSE. On Linux that means the fusermount program is installed, on Windows you install WinFsp, and on a Mac you pick macFUSE, FUSE-T or the NFS based rclone nfsmount. With FUSE-T, a blocked write can fail without any message.

It is still a view of a remote, with the speed of your connection. Opening a folder of thumbnails can mean a lot of downloading, so for restoring a whole tree I’d use rclone copy and leave the mount for looking around.

Further reading: rclone mount

More Rclone tips rclone copyurl https://example.com/files/big.iso remote:isos -a rclone size remote:photos rclone config redacted rclone ncdu remote:backup rclone copy /data remote:data --bwlimit "08:00,1M 18:00,5M 23:00,off" -P All Rclone tips (14) All topics

Link