View Full Version : [ubuntu] Encrypted BackUps -> BackinTime?
frogotronic
May 22nd, 2010, 06:59 PM
Hello,
If I'm using Karmic and have an encrypted home folder, when I use BackinTime (or another program) to make backups on an external drive, is/are that backup-ed files also encrypted?
Thanks,
CH
Frogs Hair
May 23rd, 2010, 01:33 AM
I attempted to ask that question on the Back in Time website , but I got a sever not found message.
frogotronic
May 23rd, 2010, 02:07 AM
okay, thanks...maybe someone from the community can answwer this query...
:popcorn:
FuturePilot
May 23rd, 2010, 03:00 AM
It depends. If you're backing up your /home/$USER then no, they are not encrypted. You would have to back up /home/.ecryptfs/$USER if you wanted the encrypted content. The problem with that right now is that because of the encrypted file names, if you ever needed to restore a file it would be almost impossible to figure out which one it was.
samuraiii
May 23rd, 2010, 10:20 AM
Maybe the best way will be encrypt backup separately through encfs...
like its suggested here http://ubuntuforums.org/showthread.php?t=148600
but mount encrypted folder directly in backup (encfs <backup/device>/encrypted /home/$user/backup)
and then sync ~/backup with the files you want....
and if you want strong password this would help you not to need it enter it everytime
http://bitbucket.org/obensonne/gnome-encfs/src (http://ubuntuforums.org/d%20if%20you%20want%20strong%20password%20this%20w ould%20help%20you%20not%20to%20need%20it%20enter%2 0it%20everytime%20http://bitbucket.org/obensonne/gnome-encfs/src)
abuster
April 11th, 2011, 08:38 PM
Since this is top rated at google for "backintime encrypted backup", I will bump and share my solution here.
Install encfs and zenity:
apt-get install encfs zenity Create encrypted directory. If you would like support for hard links(backintime incremental backups), choose the standard mode, not paranoia mode.
cd /whole/path/to
mkdir .backintime_encfs
mkdir backintime
encfs /whole/path/to/.backintime_encfs /whole/path/to/backintime
Script to mount and run backup:
#!/bin/bash
# Script to mount encrypted directory and run backup.
enc_path=/whole/path/to
directory=backintime
enc_directory=.backintime_encfs
extpass="zenity --title 'Encrypted backup' --entry \
--text 'Please type password for encrypted backup storage' --hide-text"
#set display for password prompt
export DISPLAY=:0.0
#check if directories exists
if [ -d $enc_path/$enc_directory ] && [ -d $enc_path/$directory ]
then
# check if encrypted directory already is mounted
mountpoint $enc_path/$directory > /dev/null
if [ "$?" != "0" ]; then
encfs --extpass="$extpass" $enc_path/$enc_directory $enc_path/$directory
fi
# check if mount was successful
mountpoint $enc_path/$directory > /dev/null
if [ "$?" = "0" ]; then
echo "Running backup..."
nice -n 19 /usr/bin/backintime --backup-job >/dev/null 2>&1
# optional umount of encrypted storage:
# fusermount -u $enc_path/$directory
exit 0
else
echo "Unable to mount encrypted directory"
exit 1
fi
else
echo "Encrypted directory not found"
exit 1
fi
Disable schedule in Back In Time, and add script to crontab:
crontab -e
# add this line and save
@hourly /usr/local/bin/encrypted_backup_script
If "fusermount -u $enc_path/$directory" is uncommented, the password prompt will show every time the backup runs. If it's commented, the encrypted storage will stay mounted as long as the machine runs.
Reference: http://ubuntuforums.org/showthread.php?t=148600
irw
April 28th, 2011, 01:50 PM
I have an encrypted partition on my external HD; hence once mounted, it can be used as any other external drive, and any type of backup program can be used.
Once unmounted, it is encrypted and secure.
I have been using BackInTime, but was shocked to discover today that it does not backup hidden files or folders ](*,) - eg. ".thunderbird" which includes all my email and is one of my more important folders to backup!
(Fortunately I am paranoid and have other backup systems in place, and have not lost anything yet)
frogotronic
April 28th, 2011, 02:22 PM
I have actually switched to DejaDup for exactly this reason.
- CH
serenicom
May 2nd, 2011, 01:05 AM
I have been using BackInTime, but was shocked to discover today that it does not backup hidden files or folders ](*,) - eg. ".thunderbird" which includes all my email and is one of my more important folders to backup!
(Fortunately I am paranoid and have other backup systems in place, and have not lost anything yet)
By default BackInTime excludes hidden files, I tripped over that one too. Go into Settings>Exclude and remove .* from the list.
Phil S.
irw
May 2nd, 2011, 06:09 PM
I have just discovered this 10 minutes ago when i had a look at my wife's PC ... :oops:
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.