# backup gentoo

## slashlinux

Hello,

I have two servers, and i want to backup from one to another , once at week, how can i do that, with what programms?

thank you

----------

## a3li

rsync/rsnapshot

----------

## slashlinux

Hello there,

Can you give a good tutorial for this rsync?

Thanks

----------

## matomato76

1. Enable ssh log on w/o password between source machine and target machine

http://www.linuxproblem.org/art_9.html

2. Find rsync commands working for you. 

 (1) Decide which directories should be excluded. 

      - Google search for 'system backup by tar' or something like that will give you a hint

 (2) Find a proper rsync command

       - Rsync can be done in a couple of ways. If you do backup to a remote machine, rsync-over-ssh is a good choice. Between two partitions on the same machine, just rsync works. Rsync-over-ssh needs step 1. 

       - My options for remote backup is avoruzx. You may not need z for local backup. Reading man page for the options and others will help you to find out the best options for you. 

       E.g. man rsync is enough. 

3. Setting up cron 

 Without this, you can do backup manually by 1 and 2. 

 This step is for automatic, scheduled backup. A simple way is to install vixie-cron, add it to the default run level & start(rc-update, /etc/init.d/...) and then, to edit /etc/crontab. The command(s) from 2 needs to be placed there. 

Hope this help you!

----------

## solamour

I've been using "Stage4" script for quite a while, and it has worked well for me.

http://en.gentoo-wiki.com/wiki/Custom_Stage4

It creates a tar file and stores it to a local directory, but you can store the tar file to somewhere else with something like the following.

```
tar --exclude=... --create --absolute-names --preserve-permissions --verbose --totals / | ssh USER@HOST "cat > ~/stage4.tar"

```

I'm sure there are plenty of other ways to backup the system, so try and decide for yourself.

__

sol

----------

## slashlinux

Thank you very much for helpping me.

----------

## HeissFuss

If you want to be able to restore point in time, you can try rdiff-backup, which is basically rsync that allows point in time restore.

----------

## ultraincognito

I archive my Gentoo so:

```
# tar cjfp $HOME/system.tar.bz2 --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/root/* --exclude=/usr/portage/distfiles/* --exclude=/home/* --exclude=/mnt/* /*
```

----------

## cwr

Unison is another possibility for synchronising two systems.

Will

----------

