LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-17-2006, 09:15 PM   #1
sutley
Member
 
Registered: Jul 2004
Posts: 42

Rep: Reputation: 15
Rsync Entire Filesystem?


What would happen if I tried to rsync my entire system across a network to another machine (except for whatever file controls the IP address of the machine)? Is this a valid method for cloning a machine? Are there other files/directories I would need to exclude?
 
Old 09-17-2006, 10:01 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Rsync is fine to do full machine backups. I googled it, (as you should have ) and saw plenty of examples of how to do it.

The main things to leave out are:
the /proc directory

The IP file is usually just what tells it to use DHCP to get an address, so it doesn't have specific addresses in it. If you do assign static addresses, then don't copy that file.

Some articles to look at:
http://www.linux.com/article.pl?sid=04/09/15/1931240
http://forums.debian.net/viewtopic.php?t=268&

Peace,
JimBass
 
Old 09-18-2006, 12:26 AM   #3
sutley
Member
 
Registered: Jul 2004
Posts: 42

Original Poster
Rep: Reputation: 15
thanks

what i used for "cloning" my server

### exclude_file.txt
/dev/
/mnt/
/lost+found/
/sys/
/boot/
/media/
/proc/
/selinux/
/tmp/
sysconfig/

$ rsync -rlpogt --progress --exclude-from="exclude_file.txt" --delete -e "ssh" / root@192.168.1.10:/
 
Old 09-18-2006, 12:37 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
Quote:
Originally Posted by sutley
what i used for "cloning" my server
That all looks good, but not technically a "clone" (which you may not need). You should probably also have a copy of at least your MBR, probably all of Track 0 would be better (to catch parts of grub/lilo). A copy of "fdisk -l" output could be a lifesaver. A seperate copy of /etc/fstab is very handy as well.

You can see some of the other things I typically backup in this thread: http://www.linuxquestions.org/questi...d.php?t=484104

As you can see, I backup quite a bit more than is technically required for a restore. But some of what I backup is for ease and convenience of a bare-metal restore. Also stuff that might be handy in troubleshooting a problem that does not require a restore.
 
Old 10-04-2006, 07:29 PM   #5
sutley
Member
 
Registered: Jul 2004
Posts: 42

Original Poster
Rep: Reputation: 15
where did i go wrong?

The RSYNC man pages state that a valid use might be:

rsync [OPTION] ... [USER@]HOST:SRC DEST

However, when I ran this FROM my backup server (so that my primary server wouldn't have to bear the load of executing it), I ended up overwriting files on my primary server. Oh No! Why? I thought that this would be telling the backup server to go and get the files from 'root@192.168.1.10:/' (root on my primary) and put them in '/' (root on my backup). It looks like it did the opposite to me.

### exclude_file.txt
/dev/
/mnt/
/lost+found/
/sys/
/boot/
/media/
/proc/
/selinux/
/tmp/
sysconfig/

$ rsync -rlpogt --progress --exclude-from="exclude_file.txt" --delete -e "ssh" root@192.168.1.10:/ /

Thanks,
Sam
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync.net opens offsite storage to entire SSH suite jbrooks Linux - Software 0 05-02-2006 04:47 PM
DISCUSSION: Virtual Filesystem: Building a Linux Filesystem from an Ordinary File mchirico LinuxAnswers Discussion 0 10-28-2004 11:35 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 03:49 PM
Mount Loopback filesystem on an entire HD image? wartstew Linux - General 0 01-24-2003 08:46 PM


All times are GMT -5. The time now is 11:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration