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 01-25-2015, 01:07 AM   #1
massy
Member
 
Registered: Nov 2013
Distribution: CentOS 6.4
Posts: 209
Blog Entries: 1

Rep: Reputation: Disabled
Having BackUp of an installed OS


I want to have a back up of a debian OS with all of its service and its configuration and all of information. Is there any way to have it so that I can restore all of that again as a OS and its information!?

Last edited by massy; 01-25-2015 at 05:06 AM.
 
Old 01-25-2015, 03:09 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Use tar command witch -p option. Tar only persistent directories or required ones.
 
Old 01-25-2015, 08:59 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
The one piece of information that tar doesn't backup is the boot sectors.

If you DO ever restore the backup, you have to use an emergency or live system; and after the restore you have to reinstall your boot blocks before you can boot the restored system.
 
Old 01-25-2015, 12:53 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You might have a look at Clonezilla. I don't personally bother, though. I have kickstart (FAI would work for Debian) configuration files to rebuild cluster machines and then puppet rules that handle installation and configuration of software. Source code is kept in a backed-up git repository for easy re-cloning. To me this is easier than maintaining a bunch of different disk images, but it might be overkill for one or a few servers.
 
Old 01-26-2015, 10:04 AM   #5
stspringer
LQ Newbie
 
Registered: Jan 2013
Posts: 18

Rep: Reputation: Disabled
I have a centos 6.5 server set up, I found the easiest way to backup with peace of mind is to clone your hard drive.

I connect a second hard drive to my system "the one I want to clone too". Same size as original source hard drive in my case 2TB drives.


I boot off of a Knoppix 7.2 live cd. I start a terminal session as su

then I type:

dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror

DON'T MIX THIS UP!!!! MAKE SURE YOU KNOW WHICH DRIVE IS THE SOURCE AND WHICH IS THE TARGET

if=/dev/sda : Input disk (source)
of=/dev/sdb : Output disk (destination)

It takes approx 5 hours so I start the clone before I plan on going to bed

It works every time. I test it by booting off the clone drive.

I have successfully cloned the same size hard drives while linux was running from a terminal with the above command.
but it is safer if you just do the cloning from the live cd since both drives will be unmounted.

Last edited by stspringer; 01-26-2015 at 10:10 AM.
 
1 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
backup required to rebuild server with installed s/w INDy2k Linux - Server 2 03-19-2014 05:12 AM
[SOLVED] Making a backup of an installed distribution with all the changes intact Aquarius_Girl Linux - Newbie 15 02-04-2011 03:20 AM
how to backup an entire system including installed apps Nabeel Ubuntu 3 01-18-2010 11:26 AM
How to backup installed packages?? s26c.sayan Arch 2 03-03-2007 03:48 PM
Just installed Fedora on backup drive, now can't boot windowsXP Desram Fedora 10 05-25-2004 06:24 AM

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

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