LinuxQuestions.org
Help answer threads with 0 replies.
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 10-10-2014, 06:34 PM   #1
Almaz
Member
 
Registered: Jul 2013
Posts: 35

Rep: Reputation: Disabled
Live restore remotely?


Is there a software to do a complete live restore on a running debian system?

Last edited by Almaz; 10-11-2014 at 12:31 AM.
 
Old 10-10-2014, 10:47 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
It is not completely clear on which system you will do the restore. On the second machine that you mention? What runs on the restore target? Do you restore over the running Debian?

If you restore on a machine running the same kernel version:
- make sure you partioning scheme is the same as in the backup
- get the disk UUID's on the target and modify etc/fstab in the backup
- delete any network settings in etc/udev/rules.d/70-persistent-net
- do restore /dev on the target
- skip /sys and /proc if they happen to be included in the backup

Then overwrite the running target with your backup.

I hope the boot record on the target is the same as on the original. If it is not, you should mount the partition holding the backup, chroot into the backup and do a grub-install on the boot disk of the target. This is what I normally do when I restore a backup on a new hard disk, but then I boot from a live version. I prefer not to do it on a remote machine tough.

jlinkels
 
Old 10-10-2014, 10:52 PM   #3
Almaz
Member
 
Registered: Jul 2013
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jlinkels View Post
It is not completely clear on which system you will do the restore. On the second machine that you mention? What runs on the restore target? Do you restore over the running Debian?

If you restore on a machine running the same kernel version:
- make sure you partioning scheme is the same as in the backup
- get the disk UUID's on the target and modify etc/fstab in the backup
- delete any network settings in etc/udev/rules.d/70-persistent-net
- do restore /dev on the target
- skip /sys and /proc if they happen to be included in the backup

Then overwrite the running target with your backup.

I hope the boot record on the target is the same as on the original. If it is not, you should mount the partition holding the backup, chroot into the backup and do a grub-install on the boot disk of the target. This is what I normally do when I restore a backup on a new hard disk, but then I boot from a live version. I prefer not to do it on a remote machine tough.

jlinkels

I guess I wasn't clear. I'd like to do a complete restore of the computer remotely over ssh. Is it possible in linux? For example in windows Acronis True Image allows to do a complete restore on it's own machine even remotely. Can rsync to do a live restore of the whole system?

Last edited by Almaz; 10-10-2014 at 10:54 PM.
 
Old 10-11-2014, 07:33 AM   #4
JeremyBoden
Senior Member
 
Registered: Nov 2011
Distribution: Debian
Posts: 1,022

Rep: Reputation: 203Reputation: 203Reputation: 203
rsync can't do a backup of a running system because some of the files are locked.
However, you can boot a live CD and then successfully run a rsync of your disk system.
I actually do this as part of my backup strategy.

I would imagine (not tried it yet(!)) that you could do a restore in the same way.
 
Old 10-11-2014, 08:04 AM   #5
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Quote:
Originally Posted by JeremyBoden View Post
rsync can't do a backup of a running system because some of the files are locked.
Exactly which files are locked? This is not Windows. Not a single file is locked but database files like Postgresql or MySQL can be inconsistent when backed up on file level.

Quote:
Originally Posted by Almaz
I guess I wasn't clear. I'd like to do a complete restore of the computer remotely over ssh. Is it possible in linux? For example in windows Acronis True Image allows to do a complete restore on it's own machine even remotely. Can rsync to do a live restore of the whole system?
Yes it can. Contrary to Windows there a no magic files being locked or inaccessible. In Windows you need special agents to perform read or write and even then it can fail.
The only risk is what I said inconsistent database files. You'd need to make a database dump before backup and copy that dump file. During restore both database files and dump are restored. In case the database was corrupted you can restore it from the dump.
Now keep in mind that rsync works on the file level. If you damage your installation on the file level this can be restored. If you damage something more significant like your MBR or partition tables, you can't expect rsync to repair that.

jlinkels
 
Old 10-11-2014, 06:15 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,658

Rep: Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257
I think I've only seen one "live state" backup for linux. It's a commercial product.
 
  


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
Backup and Restore help jayfurrie Linux - Newbie 1 11-10-2012 04:53 AM
Help with a Backup/Restore KrazyKanuk Linux - Software 1 10-22-2009 12:02 AM
Backup and restore magasem AIX 7 07-30-2006 02:36 PM
Backup Restore to new PC tjabaut Linux - Hardware 2 07-15-2006 12:01 AM
backup / restore 5pints Linux - Software 2 01-11-2005 10:08 AM


All times are GMT -5. The time now is 05:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration