LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-19-2011, 02:35 AM   #1
hsnanua
Member
 
Registered: Aug 2011
Posts: 40

Rep: Reputation: Disabled
back up everything


Dear All,

I am going to re-install the clustering software in my RH server (CENTOS).

Should there be an issue, we need to roll back.

Is there anyway, i can backup everything on my server, and then revert back to the original system?

Thanks
 
Old 09-19-2011, 04:01 AM   #2
froff
Member
 
Registered: Nov 2005
Location: Poland
Distribution: Mint Mate, Ubuntu
Posts: 49

Rep: Reputation: 1
Just use rsync -a in single user mode to copy everything. Exclude
- /dev*
- /proc/*
- /sys/*
- /tmp/*
- lost+found/
- /media/
and other directories with mountpoints that you don't want to copy.
Create them empty on destination filesystem with the same rights.

Use grub-install after operation, to configure boot loader in destination environment (or restore it after rollback)).

That is all.
 
Old 09-19-2011, 03:11 PM   #3
zackwasa
Member
 
Registered: Sep 2011
Posts: 52

Rep: Reputation: Disabled
You can get a nice progress using rsync -av --progress

RMI

Last edited by zackwasa; 01-12-2012 at 01:03 AM.
 
Old 09-19-2011, 03:28 PM   #4
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 202

Rep: Reputation: 36
If you want an exact copy of your HD you can use dd.

dd if=/dev/sda (or whatever your device is) of=/dev/file.containing.HD.image

using /dev/sda will do an exact image of that drive wich will contain the partitions on that drive (sda1, sda2, etc...) and all its data.
 
Old 09-19-2011, 10:01 PM   #5
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269

Rep: Reputation: 54
Quote:
Originally Posted by rodrifra View Post
If you want an exact copy of your HD you can use dd.

dd if=/dev/sda (or whatever your device is) of=/dev/file.containing.HD.image

using /dev/sda will do an exact image of that drive wich will contain the partitions on that drive (sda1, sda2, etc...) and all its data.
If this is a true server using hardware this might complicate the usage of something like DD, especially if done without booting to the OS.If this really is critical data I would recommend you do a file level backup to another disk/share, which you can then verify easily from a different server. Then if you can shutdown and boot to a CD or something similar and do a DD to get a block level copy off to a different disk as well that wouldn't hurt.

But what interests me is that if this is a part of a cluster, why even bother? Everything should be replicated across all nodes, otherwise you would have serious problems with failing over or load balancing on the cluster nodes. Realistically all that should be on local dis is the OS and configuration files.
 
Old 09-19-2011, 10:11 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by hsnanua
Should there be an issue, we need to roll back.

Is there anyway, i can backup everything on my server, and then revert back to the original system?
I use dump(8) and restore(8) for exactly this purpose.
  1. Backup the filesystems (using snapshots if they're LVM2; otherwise, you may need to boot with a live CD to get good backups) and an easy-to-access copy of /etc/fstab.
  2. Upgrade and/or make your changes.
  3. If rollback is needed, boot with a live CD, create the filesystems, and restore(8).

Tape device optional. You can do all this over ssh(1).
 
Old 09-20-2011, 01:26 AM   #7
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 202

Rep: Reputation: 36
Quote:
Originally Posted by ComputerErik View Post
If this is a true server using hardware this might complicate the usage of something like DD
Quite true, I wasn't thinking of RAID systems, just a simple HD.

Quote:
Originally Posted by ComputerErik View Post
But what interests me is that if this is a part of a cluster, why even bother? Everything should be replicated across all nodes, otherwise you would have serious problems with failing over or load balancing on the cluster nodes. Realistically all that should be on local dis is the OS and configuration files.
Good point, if it were a [Heartbeat|OpenAIS]/Pacemaker cluster all servers should have the same files (clusterwise talking of course). But what about the rest of the files or services (if any) that may not be running through the cluster? maybe that is what he wants to backup too.
 
Old 09-21-2011, 04:50 AM   #8
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Install a need disk and keep the old is another way.
 
  


Reply



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
Tilde / back-tick key not giving me a tilde or back-tic. Ubuntu 10.04 on Macbook Pro BrianK Linux - Laptop and Netbook 3 09-01-2015 09:14 PM
Minicom not working I connected linux machines back-to-back Prabhunath Linux - Networking 2 06-30-2010 04:39 AM
Can't log back in after changing runlevels from init 3 to 1 back to 3 manwichmakesameal Slackware 5 06-29-2009 11:36 AM
Connecting 2 linux computer back to back with cross cable. michalng Linux - Networking 8 02-11-2009 07:00 AM
Back button to Go Back? javamdk Linux - Newbie 2 07-08-2004 11:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration