Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Right now I use the following to back up a small project folder to a USB Flash drive:

alias a='alias'
a dateseq='date "+%Y-%m-%d %H:%M:%S"'
a backup_proj='cp -a ~/code/MyProj "/Volumes/KINGSTON/MyProj `dateseq`"

so each time I type backup_proj, the folder is backed up from the hard drive to the USB drive, and each project is also internally version controlled using Git. Each folder is only about 500kb so it takes a long time to even fill up 1GB (the Flash Drive is 16GB). The folder is backed up as:

$ ls -1 /Volumes/KINGSTON/
MyProj 2012-05-27 08:20:50/
MyProj 2012-05-27 10:27:56/
MyProj 2012-05-27 14:53:01/

But I get paranoid and also want to back up to Google Drive or Dropbox so it will get uploaded to their server automatically, just by encrypting the whole folder and copying the single resulting file to Google Drive's folder, and the password can be apple234321pineapple and specified on the command line. I wonder what is a good way to encrypt the folder into a single file so that it takes a non-practical time to crack? (can you please give the command line that will do it).

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Zip and and run ccrypt over it:

 ccencrypt yourfile.zip
 ccdecrypt yourfile.zip.cpt
share|improve this answer
    
so either zip or tar... or make it a .rar? –  Jian Lin May 29 '12 at 9:19
    
I saw a blog about OpenSSL, is it better / worse? –  Jian Lin May 29 '12 at 9:20
    
ccrypt is simpler, if you use AES, it's the same. It doesn't matter if it's zip, rar, bzip... use whatever you like more :) –  mulaz May 29 '12 at 9:25
    
oh by the way... ccencrypt is not on Mac OS X... sorry at first I thought ccencrypt is standard on UNIX –  Jian Lin May 29 '12 at 20:03

Maybe you have a look at http://wertarbyte.de/tartarus.shtml. this is a full backup solution with GnuPG encryption of the data but maybe it is oversized for your needs

share|improve this answer

Google drive doesn't have any linux client yet, so it will be dificult to use this app. Dropbox has linux client even for command line so thats good. You can install it configure a folder and put your backup there rest will be done by Dropbox application.

There is also good TrueCrypt client for linux command line. TrueCrypt is very good and very safe encryption software, so that all the tools that you need to achive your goal.

But you must remember that Dropbox has problem with synchronize truecrypt files because adding new staff to truecrypt files doesn't change any of truecrypt file so dropbox doesn't know is it already modified file and need to by synchorized. That problem could be solved by creating every time new truecrypt file while making a new backup or removing old file and create new one.

Here are some useful links :

https://www.dropbox.com/install

http://www.truecrypt.org/

https://www.google.pl/search?sourceid=chrome&ie=UTF-8&q=truecrypt+and+dropbox

share|improve this answer
    
I thought you can just copy the file to the Google Drive or DropBox folder and it will be uploaded automatically (on Mac or PC) –  Jian Lin May 29 '12 at 9:18
    
Yes that's the way dropbox works but first you must install it and configure, google drive doesn't work on linux so you can't use it. All you need is write simple script that will encrypt your data with help of TrueCrypt app and then move it to dropbox folder and voila :) thats all. :D –  B14D3 May 29 '12 at 9:28
    
I don't believe that Dropbox has a problem with TrueCrypt files, it's a popular combination. The last link you provided has accounts of some people experiencing too much synchronisation (i.e. the whole container sync'ing every time, rather than just the changes), but I've never heard of Dropbox failing to recognise that a TC container has been modified. –  Jon M May 29 '12 at 11:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.