Restore single file from encrypted remote
I'm looking for a remote backup solution. The goal is to:
- have the entire backup encrypted, including metadata such as how many files there are, file names, modification timestamps, ...
- back up incrementally, ideally with daily/weekly/monthly snapshots each kept for some time (e.g. dailies kept for 1 week, weeklies kept for 1 month, ...)
- be able to restore a single file from a given point in time without downloading entire snapshots or increments and without sending any decryption keys to the remote. E.g. "give me /home/myuser/list.txt from the last snapshot before 2021-03-26"
As far as I can tell, many tools, including ZFS with zfs send, are able to do the first two. I can't figure out how to do the third, though.
It seems it should be possible; in the worst case ZFS could treat remote files as (very slow) block storage and read as needed. Transmitted data and remotely stored data would always be encrypted, only locally decrypted. Perhaps with a remote mounted over sshfs or NFS, with ZFS creating block files on the mounted directory?
Has anyone succeeded in doing this? Are there tools to help set this up?
Posted Mar 28, 2021, 10:58 PM UTC
I just use borg for backup. Remote and local. Encrypted, deduped and mountable through ssh
Thanks for this! I just read their FAQ and docs. It seems like it does what I want.
Although it unfortunately doesn't use ZFS streams to get changes since the last snapshot.
I do wonder how their extract command fetches individual files from an untrusted remote.
The untrusted remote is encrypted and the key never leaves your local system
If it works anything like Duplicacy, there is a file index stored on the remote (encrypted, of course). It fetches that first and then uses it to know which blocks it needs to fetch to reconstruct each file.