You are not logged in.
Pages: 1
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
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
there's sbackup which is pretty nice
Offline
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
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
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
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
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
Pages: 1