I am looking to create an encrypted container using VeraCrypt which will be located on a remove server. This server will be located on a local network and is behind a firewall with no publicly accessible ports.
This container will be used as a backup for files on my laptop.
I currently rsync the files to the server, where they live in a plaintext format.
I am looking to see if it is possible to do something along the following lines:
- Have the container encrypted using a keyfile, which will be located on (e.g.,) a USB key
- Have some script which will be run on the local machine which sshs into the remote server and opens the container using the keyfile on the USB, mounting the container to something like /mnt/secure_data
- Rsync the differences
- Unmount the /secure_data folder
This would be run every 30 minutes, for example.
The complicating factor here seems to be managing a remote container, whereas I can’t visualize a flow which allows me to perform the above operations but using a local container and then just rsyncing that, as the container will be ‘open’ while the files are being worked on, and I’m looking to be able to incrementally backup the work, not just when I’m finished for the day.
Is this infeasible? Is there a better way to achieve the goal? Thanks!