It's nice that with github and similar services, I can backup my open-source projects (using 'git push'). With private data, I have some reservations though. I'd prefer that my repos are encrypted on the server (I don't think they do that at github, no?). I know that one of the alternatives is to rent a VPS, set up an encrypted partition on it, and back up using git+ssh. But I wonder if normal (non-root) SSH accounts can work as well? I'm thinking of two alternatives:

1) 'git push' to a local copy, do per-file encryption on the local copy, and then rsync local copy to server via ssh.

2) set up a local encrypted partition on a loop device on a file (say encrypted.img), 'git push' to the local copy on the encrypted partition, then rsync encrypted.img to the server.

I'm not sure on how to do #1, and I'm afraid #2 will be significantly less efficient, data-transfer-wise.

Note that this is mainly for backup purposes only. I prefer to update the backup on a per-commit basis (so I would invoke the update backup process using git's post-commit hook).

  • I'm going to try the "cryptcontainer on remote storage" route. Although some think this is a bad solution, but it's a good compromise security-wise, to me. – Gerry Lufwansa Oct 10 '13 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.