View previous topic :: View next topic |
Author |
Message |
slashlinux n00b
Joined: 26 Nov 2011 Posts: 62 Location: dan
|
Posted: Thu Apr 05, 2012 3:26 pm Post subject: backup gentoo |
|
|
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 |
|
Back to top |
|
|
a3li Retired Dev
Joined: 02 Sep 2008 Posts: 122 Location: 독일
|
Posted: Thu Apr 05, 2012 3:31 pm Post subject: |
|
|
rsync/rsnapshot _________________ I am Confuism. Do not bother me. |
|
Back to top |
|
|
slashlinux n00b
Joined: 26 Nov 2011 Posts: 62 Location: dan
|
Posted: Thu Apr 05, 2012 3:33 pm Post subject: re: |
|
|
Hello there,
Can you give a good tutorial for this rsync?
Thanks |
|
Back to top |
|
|
matomato76 n00b
Joined: 19 Nov 2010 Posts: 11
|
Posted: Thu Apr 05, 2012 5:07 pm Post subject: Three steps |
|
|
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! |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 726 Location: San Diego, CA
|
Posted: Fri Apr 06, 2012 1:38 am Post subject: |
|
|
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.
Code: | 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 |
|
Back to top |
|
|
slashlinux n00b
Joined: 26 Nov 2011 Posts: 62 Location: dan
|
Posted: Fri Apr 06, 2012 8:25 pm Post subject: re: |
|
|
Thank you very much for helpping me. |
|
Back to top |
|
|
HeissFuss Guru
Joined: 11 Jan 2005 Posts: 414
|
Posted: Fri Apr 06, 2012 8:30 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
ultraincognito Guru
Joined: 03 Jun 2011 Posts: 346 Location: Ukraine
|
Posted: Sat Apr 07, 2012 8:56 am Post subject: |
|
|
I archive my Gentoo so:
Code: | # tar cjfp $HOME/system.tar.bz2 --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/root/* --exclude=/usr/portage/distfiles/* --exclude=/home/* --exclude=/mnt/* /* |
|
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Sat Apr 07, 2012 9:39 am Post subject: |
|
|
Unison is another possibility for synchronising two systems.
Will |
|
Back to top |
|
|
|