You are not logged in.

#1 2007-11-27 19:43:41

fflarex
Member
Registered: 2007-09-15
Posts: 466

backup methods?

I'm currently trying to write a bash script (my first, actually) to automatically backup my data, and was wondering what the best method would be for my needs. At first I just whipped up a quick rsync script, but since then I've decided that it would be nice to have it encrypted and possibly compressed too, seeing as I went through all the trouble of encrypting my entire hard drive (minus the boot partition).

Any suggestions? The less I need to modify my external drive, the better, as I don't have the space available to backup everything that is on it (in order to reformat it or encrypt it or something).

Offline

#2 2007-11-27 20:53:19

sinister99
Member
Registered: 2007-04-10
Posts: 136

Re: backup methods?

I tried a bunch of different programs, and I eventually settled on dar (community).  It is pretty powerful, but it has tons of options to wade through.  Take a look at dar's wiki for how-tos.

Dar can do compression and I believe encryption.

Offline

#3 2007-11-27 22:05:38

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: backup methods?

there's sbackup which is pretty nice

Offline

#4 2007-11-28 16:33:38

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: backup methods?

Check out duplicity (it's in community as well).

Last edited by elasticdog (2007-11-28 16:34:04)

Offline

#5 2007-11-28 16:54:03

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: backup methods?

I have been using Backup Manager for some times, but I prefer the simplicity of an home made bash script.
If you have very simple needs then the best is probably use rdiff-backup in a bash script.

Cheers

Offline

#6 2007-11-28 18:40:53

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: backup methods?

Thanks everyone. I'm still not sure what I'm going to do, but you all introduced me to some tools I didn't know about before. I think I may give dar and duplicity test runs.

Otherwise I am also investigating elaborate ways to do this using only standard linux tools (rsync, tar, and gnupg (or some other encryption scheme)). But I'm not finding very efficient ways of doing this.

I guess my ideal setup would be to have the compression and encryption happen transparently, but I'd need another hdd in order to set it up without losing a lot of data.

Last edited by fflarex (2007-11-28 18:42:43)

Offline

#7 2008-01-22 15:12:41

kiloecho7
Member
Registered: 2007-08-24
Posts: 25

Re: backup methods?

Hey, I've been looking into doing the same thing also for the last hour or so, thought I would chip in my 2 cents.  If you encrypt an external drive using cryptsetup and auto mount it like you do your swap your root or /home (I assume you've seen the wiki on it), then put the external drive into fstab and /etc/crypttab and you could continue your bash script from there and not worry about encryption through some other means.  I'm a newbie so there might be something wrong with my theory, but please post if it does work.

kiloecho7

Last edited by kiloecho7 (2008-01-22 15:13:54)

Offline

#8 2008-02-05 15:37:43

kiloecho7
Member
Registered: 2007-08-24
Posts: 25

Re: backup methods?

Yep, it does work.  Here is my custom bash script for those who are curious.

cryptsetup luksOpen /dev/sdb1 external -d /etc/luks-keys/external

mount /dev/mapper/external /mnt/external

rsync -aP --exclude /dev --exclude /opt/arch32/dev\
 --exclude /mnt --exclude /opt/arch32/mnt\
 --exclude /media --exclude /opt/arch32/media\
 --exclude /proc --exclude /opt/arch32/proc\
 --exclude /sys --exclude /opt/arch32/sys\
 --exclude /tmp --exclude /opt/arch32/tmp\
 --exclude /var/tmp --exclude /opt/arch32/var/tmp\
 / /mnt/external/backup/current

umount /mnt/external

cryptsetup luksClose /dev/mapper/external

echo "daily backup successful $(date)" >> /mine/archlinux/backup.log

Offline

#9 2008-02-05 21:50:47

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: backup methods?

fflarex wrote:

I'm currently trying to write a bash script (my first, actually) to automatically backup my data, and was wondering what the best method would be for my needs. At first I just whipped up a quick rsync script, but since then I've decided that it would be nice to have it encrypted and possibly compressed too, seeing as I went through all the trouble of encrypting my entire hard drive (minus the boot partition).

Any suggestions? The less I need to modify my external drive, the better, as I don't have the space available to backup everything that is on it (in order to reformat it or encrypt it or something).

use arch-backup:
http://aur.archlinux.org/packages.php?d … =1&ID=5857
you can encrypt the backup files afterwards.

vlad

Offline

Board footer

Powered by FluxBB