LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-16-2016, 03:15 AM   #1
yo8rxp
Member
 
Registered: Jul 2009
Location: Romania
Distribution: Ubuntu 10.04 Gnome 2
Posts: 102

Rep: Reputation: 31
backup entire system


Hi folks !
got an issue here and i hope 4 some help pls.

ubuntu server here
/boot is on flash drive , got it cloned on several flash drives just 4 backup

/ is on 2 x 1TB mirror mdadm (md0 ) , usage is 17G except a backup folder (600GB)

got a 120 GB ssd drive mounted on /mnt and rsynced / on it except that backup folder , /proc/* /sys/* and /mnt*

Running from raid array , i did save /boot/grub/grub.cfg somewhere , and ran update-grub

Now, looking at ssd drive entry , i see that instead ssd UUID , root is still md0 UUID.
How can I do it properly without using dd (long time and spare drive must be same size)?

All i want to accomplish is to sync weekly entire system on a secondary drive , so if system got unusable for different reasons , i can do a failsafe reboot on SSD drive, loosing only 1 week data
 
Old 03-16-2016, 04:39 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Change the UUID in /boot/grub/grub.cfg and fstab as well. You might also want to copy the mbr to the ssd. As well ass not backup /dev. You might also end up in the wrong spot if while you rsync some files might change and you end up with inconsistency. Best way. Boot into another (live) system. Then rsync /, dd the mbr, edit fstab and grub.cfg. Then reboot into original system.
 
Old 03-16-2016, 06:03 AM   #3
yo8rxp
Member
 
Registered: Jul 2009
Location: Romania
Distribution: Ubuntu 10.04 Gnome 2
Posts: 102

Original Poster
Rep: Reputation: 31
Thanks zhjim 4 quick reply !
Indeed , seems like it needs manualy change UUID in grub.cfg wich i do not seem right , update-grub should add new drive UUID auutomaticaly , no ?

cloning mbr is not an issue here as long /boot resides on external flash drive

I can do manually update grub ,but in this case i should rsync --except /etc/fstab in order not to return to previous case .
anyway , i gotta do some further investigations in order to do a proper entire system back-up

Thank you !
 
Old 03-16-2016, 09:15 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Not sure about the internals of update-grub but i doubt that it will change UUID of root devices if it still finds existing one. You might try to chroot into your ssd backup and run update-grub there. Might change the uuid. Definitely checkout /boot/grub/device.map.
 
Old 03-16-2016, 09:17 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
A good approach is to have rsync scripts that run more-or-less constantly, sending the data to a directory on the backup drive which is write-protected, accessible only to the special user-id that's responsible for backups. This is basically how Apple's Time Machine operates. There are a number of good web pages that show how the trick is done.

For instance, this one: https://bipedu.wordpress.com/2014/02...-time-machine/

And, leave us not forget this site! http://www.linuxquestions.org/questi...achine-889376/ (There are numerous really good links in that thread.)

For recovery purposes, then, you need a bootable CD-ROM ("sticks" can fail or be modified ...) that can be used to launch a recovery system, to perform filesystem tests and repairs, and so forth.

But, to be any good at all, the backups must be detailed and very current. "A week old" is useless.

From time to time, you should make a snapshot of the backup drive, take it to another machine altogether (which is not connected to the Internet), and "do a complete 'fire drill.'" The scenario is this: that "the worst has just happened," this machine is your replacement device, and your job is to completely and accurately restore the system onto it within two hours, and to demonstrate that the procedure worked. These days, I would use a phone to film the exercise.

Last edited by sundialsvcs; 03-16-2016 at 09:25 AM.
 
2 members found this post helpful.
  


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
How to take entire system backup. a.abdulna Linux - Newbie 1 06-24-2013 08:39 AM
How to backup entire system to a disc cygpen Linux - Newbie 47 09-01-2011 01:00 PM
can makepkg backup my entire system globaltree Slackware 3 09-15-2009 03:15 PM
Backup entire system with tar sln Linux - General 2 04-30-2004 03:32 AM
How can I backup my entire system? TheDirtyPenguin Linux - Software 5 03-16-2004 08:48 AM

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

All times are GMT -5. The time now is 05:31 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