You are not logged in.
Hello!
I tested around with rsync for a backup solution. I sync my important data to my home-server, which have a RAID 1 array.
rsync is simple and fast
But I don't know, what I have to backup on my client system in case of a harddisc crash.
My client system is a computer with a raid 0 array --> fast but dangerous.
Okay, at the moment I sync the following directories:
/home/$USER
/etc
But what is also necessary to backup?
Something in /var?
After a harddisc crash I wan't to restore my system with the same packages installed! Maybe some files from pacman?
Thanks for your hints!
Best regards,
Flasher
Offline
/opt for all the programs that currently get stored there
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
I assume you got any script running in a crond or something so do something like "pacman -Q | awk '{ print $2 }' > pkglist" to store the names of all pkgs installed, then if you would like to install them all again you will just need to type "pacman -S `cat pkglist`"
http://timtux.net/ - my personal blog about almost everything
Offline
"pacman -Q | awk '{ print $2 }' > pkglist"
Wouldn't you want to use $1?
Combining this technique with backing up the pacman cache in /var/cache/packman/pkg would have a system up running fairly quickly. Backing up the cache allows pacman to use locally cached copies of the packages rather than having to redownload from the repos.
edit: the pacman cache will grow fairly quickly since it will store old versions as well as current versions, so this may require a bit of cleanup from time to time.
Last edited by fed359 (2007-12-16 00:28:41)
Offline
the default setting of simple-backup also includes /usr/local which is quite usefull if you have something in there
Edit: just looked at the filesystem. /boot and /root are worth to include, too
Last edited by kakTuZ (2007-12-16 00:46:10)
Offline
/etc and /home should be enough
/boot isn't needed, nor /root -- you shouldn't be running as your root user.
/usr/local and /opt are pointless unless you actually specifically put stuff there you can't replace
the pacman package list is a good idea though
Offline
"pacman -Q | awk '{ print $2 }' > pkglist"
Wouldn't you want to use $1?Combining this technique with backing up the pacman cache in /var/cache/packman/pkg would have a system up running fairly quickly. Backing up the cache allows pacman to use locally cached copies of the packages rather than having to redownload from the repos.
edit: the pacman cache will grow fairly quickly since it will store old versions as well as current versions, so this may require a bit of cleanup from time to time.
Oh yhea, $1 . Didn't test the command, just wrote it
Last edited by timtux (2007-12-16 13:41:51)
http://timtux.net/ - my personal blog about almost everything
Offline
I just found this thread as I am looking for a proper backup method for my Arch install. Can someone please elaborate on the pacman cache and the package list? So I make a list of the packages installed, then the cat command reinstalls all of them? It doesn't include stuff from AUR, right?
And I can just copy over my /etc to my root when I reinstall?
Offline
I just found this thread as I am looking for a proper backup method for my Arch install. Can someone please elaborate on the pacman cache and the package list? So I make a list of the packages installed, then the cat command reinstalls all of them? It doesn't include stuff from AUR, right?
And I can just copy over my /etc to my root when I reinstall?
If you have same hw/sw config... you can just pack/unpack '/etc'.
For the AUR part, then just use 'yaourt -Q | awk '{ print $1}' > pkglist' => 'yaourt -S `cat pkglist`'. That should do the trick. Yaourt also uses pakage/PKGBUILD/sources cache, no? That means you could backup even that.
Offline
Hello!
I post you my finished script, so you can make modifications for your needs!
#! /bin/bash
hostname=`hostname`
# User specific backup
username=user1
if [ -d /home/$username ]
then
rsync -aux -v --delete --password-file /home/$username/.rsyncpw /home/$username/ $username\@sn-server-01.sim-net.local::$username\_$hostname\_arch-linux
fi
username=user2
if [ -d /home/$username ]
then
rsync -aux -v --delete --password-file /home/$username/.rsyncpw /home/$username/ $username\@sn-server-01.sim-net.local::$username\_$hostname\_arch-linux
fi
username=user3
if [ -d /home/$username ]
then
rsync -aux -v --delete --password-file /home/$username/.rsyncpw /home/$username/ $username\@sn-server-01.sim-net.local::$username\_$hostname\_arch-linux
fi
username=user4
if [ -d /home/$username ]
then
rsync -aux -v --delete --password-file /home/$username/.rsyncpw /home/$username/ $username\@sn-server-01.sim-net.local::$username\_$hostname\_arch-linux
fi
# System backup
rsync -aux -v --delete --password-file /root/.rsyncpw /etc $hostname\@sn-server-01.sim-net.local::system\_$hostname\_arch-linux
rsync -aux -v --delete --password-file /root/.rsyncpw /boot $hostname\@sn-server-01.sim-net.local::system\_$hostname\_arch-linux
rsync -aux -v --delete --password-file /root/.rsyncpw /var/log $hostname\@sn-server-01.sim-net.local::system\_$hostname\_arch-linux
rsync -aux -v --delete --password-file /root/.rsyncpw /root $hostname\@sn-server-01.sim-net.local::system\_$hostname\_arch-linux
pacman -Q | awk '{ print $1 }' > /pkglist
rsync -aux -v --delete --password-file /root/.rsyncpw /pkglist $hostname\@sn-server-01.sim-net.local::system\_$hostname\_arch-linux
rm /pkglist
Greetings
Flasher
Offline