Encrypted Git repo with TrueCrypt and SSHFS
Let’s say you want to backup your data to a server that others have access to. If you were to use some kind of encrypted archive file, it would be a hassle to download the whole archive, save changes to it and upload it back to the server every time. By mounting a TrueCrypt volume over SSHFS you can read/write what you want without downloading and re-uploading the whole volume. Here is an implementation of that with Git.
Steps:
- Mount SSHFS
- Locally mount TrueCrypt volume from SSHFS mount
- Use git to backup files to mounted TrueCrypt volume
- Unmount TrueCrypt volume
- Unmount SSHFS
Here is a script that does it all automatically.
Files in working directory:
|
|
Files on server (only the TrueCrypt volume):
|
|
git-ssh-truecript.sh:
|
|