Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Best way to back up an install of Debian?
New Posts  All Forums:Forum Nav:

Best way to back up an install of Debian?

post #1 of 15
Thread Starter 
I recently finished setting up my first Linux file server, and I'd like to make a backup of all the tweaked settings by making a copy of the disk it's installed on. If the first disk ever breaks or an update messes something up, I'd like to be able to swap disks to get it working again immediately.

Can I just copy/paste everything on the first disk to the 2nd disk?

If there is more to it, is there free software that will do it?
post #2 of 15
You could have a look at software RAID.

There are a few disk image creators and I think one of them is Partimage or clonezilla just check it.
SR71
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 960T GA-880GM-USB3 AMD Radeon HD 7750 2GB DDR3 Series Hyundai Electronics  
RAMRAMHard DriveOptical Drive
Hyundai Electronics  Hyundai Electronics  WD 360 GB / 160 GB Sony 
CoolingOSMonitorKeyboard
Cooler Master Hyper TX3 (Push & Pull) Win 7 64 bit / Suse 12.1 64 Acer 20 " Led Wide Logitech 
PowerCaseMouseMouse Pad
VIP Gold 500w Cooler Master Elite 370 Logitech My Underwear 
Audio
Altec Lansing AVS300 / Altec Lansing BXR1121 
  hide details  
Reply
SR71
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 960T GA-880GM-USB3 AMD Radeon HD 7750 2GB DDR3 Series Hyundai Electronics  
RAMRAMHard DriveOptical Drive
Hyundai Electronics  Hyundai Electronics  WD 360 GB / 160 GB Sony 
CoolingOSMonitorKeyboard
Cooler Master Hyper TX3 (Push & Pull) Win 7 64 bit / Suse 12.1 64 Acer 20 " Led Wide Logitech 
PowerCaseMouseMouse Pad
VIP Gold 500w Cooler Master Elite 370 Logitech My Underwear 
Audio
Altec Lansing AVS300 / Altec Lansing BXR1121 
  hide details  
Reply
post #3 of 15
tbh I wouldn't bother with Clonezilla etc if you just want to back up one disk. Just run this as root from the command line:
Code:
dd if=/dev/sda of=/mount-point-for-disk-2/debian-backup.iso

You will need another storage device mounted (be it local, removable or internal storage) - but that would be the case however / whatever software you used.


(you can also cat /dev/sda > /mount-point-for-disk-2/debian-backup.iso if you prefer.
post #4 of 15
Quote:
Originally Posted by Plan9 View Post

tbh I wouldn't bother with Clonezilla etc if you just want to back up one disk. Just run this as root from the command line:
Code:
dd if=/dev/sda of=/mount-point-for-disk-2/debian-backup.iso
You will need another storage device mounted (be it local, removable or internal storage) - but that would be the case however / whatever software you used.
(you can also cat /dev/sda > /mount-point-for-disk-2/debian-backup.iso if you prefer.

Small note, that would be an .img file, not an .iso tongue.gif

And yes, you can just copy+paste all the contents. The only thing that won't be preserved is the boot loader, which is easily restored.
#well
(19 items)
 
Lenovo L530
(8 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 4770k Gigabyte Z87X-UD4H XFX Radeon HD 6950 Corsair CMX8GX3M2A2000C9 
Hard DriveHard DriveOptical DriveCooling
Samsung EVO 840 Hitachi HDS722020ALA330 Generic DVD±RW Burner Noctua NH-D14 
OSMonitorMonitorKeyboard
Windows 8.1 Dell U2711 LG W2453 Ducky DK9008 Overclock.net Edition, Cherry MX B... 
PowerCaseMouseMouse Pad
Corsair TX850 Antec Three Hundred Corsair Raptor M40 QPAD HeatoN M 
AudioAudioAudio
E-MU Tracker|pre Beyerdynamic DT-770 250 Ohm AntLion ModMIc 
CPUGraphicsRAMRAM
Intel Ivy Bridge 3210M Intel HD 4000 Graphics Soldered Corsair Vengeance  
Hard DriveOptical DriveOSMonitor
500GB DVD-+RW Windows 7 Professional 1600x900 
  hide details  
Reply
#well
(19 items)
 
Lenovo L530
(8 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 4770k Gigabyte Z87X-UD4H XFX Radeon HD 6950 Corsair CMX8GX3M2A2000C9 
Hard DriveHard DriveOptical DriveCooling
Samsung EVO 840 Hitachi HDS722020ALA330 Generic DVD±RW Burner Noctua NH-D14 
OSMonitorMonitorKeyboard
Windows 8.1 Dell U2711 LG W2453 Ducky DK9008 Overclock.net Edition, Cherry MX B... 
PowerCaseMouseMouse Pad
Corsair TX850 Antec Three Hundred Corsair Raptor M40 QPAD HeatoN M 
AudioAudioAudio
E-MU Tracker|pre Beyerdynamic DT-770 250 Ohm AntLion ModMIc 
CPUGraphicsRAMRAM
Intel Ivy Bridge 3210M Intel HD 4000 Graphics Soldered Corsair Vengeance  
Hard DriveOptical DriveOSMonitor
500GB DVD-+RW Windows 7 Professional 1600x900 
  hide details  
Reply
post #5 of 15
I agree dd would be a better option.
SR71
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 960T GA-880GM-USB3 AMD Radeon HD 7750 2GB DDR3 Series Hyundai Electronics  
RAMRAMHard DriveOptical Drive
Hyundai Electronics  Hyundai Electronics  WD 360 GB / 160 GB Sony 
CoolingOSMonitorKeyboard
Cooler Master Hyper TX3 (Push & Pull) Win 7 64 bit / Suse 12.1 64 Acer 20 " Led Wide Logitech 
PowerCaseMouseMouse Pad
VIP Gold 500w Cooler Master Elite 370 Logitech My Underwear 
Audio
Altec Lansing AVS300 / Altec Lansing BXR1121 
  hide details  
Reply
SR71
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 960T GA-880GM-USB3 AMD Radeon HD 7750 2GB DDR3 Series Hyundai Electronics  
RAMRAMHard DriveOptical Drive
Hyundai Electronics  Hyundai Electronics  WD 360 GB / 160 GB Sony 
CoolingOSMonitorKeyboard
Cooler Master Hyper TX3 (Push & Pull) Win 7 64 bit / Suse 12.1 64 Acer 20 " Led Wide Logitech 
PowerCaseMouseMouse Pad
VIP Gold 500w Cooler Master Elite 370 Logitech My Underwear 
Audio
Altec Lansing AVS300 / Altec Lansing BXR1121 
  hide details  
Reply
post #6 of 15
Quote:
Originally Posted by gonX View Post

Small note, that would be an .img file, not an .iso tongue.gif

Very true. That's more force of habit than anything
post #7 of 15
Thread Starter 
Quote:
Originally Posted by gonX View Post

And yes, you can just copy+paste all the contents. The only thing that won't be preserved is the boot loader, which is easily restored.

How would I restore a boot loader?
post #8 of 15
Quote:
Originally Posted by willis888 View Post

How would I restore a boot loader?

That would. You're taking a snapshot of the HDD and saving it as a file (like an ISO CD image, except this would be a HDD image)
post #9 of 15
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

Quote:
Originally Posted by willis888 View Post

How would I restore a boot loader?

That would. You're taking a snapshot of the HDD and saving it as a file (like an ISO CD image, except this would be a HDD image)


"That" as in this?:
Quote:
dd if=/dev/sda of=/mount-point-for-disk-2/debian-backup.iso

I'm a little confused because to me it looks like that command will create an image file. Then I would need to use some program to transfer that image onto a disk in a way that makes the disk bootable.
post #10 of 15
Quote:
Originally Posted by willis888 View Post

"That" as in this?:
I'm a little confused because to me it looks like that command will create an image file. Then I would need to use some program to transfer that image onto a disk in a way that makes the disk bootable.

As long as your boot loader is installed on /dev/sda (be it the MBA or inside a partition table) then the boot loader will be saved along with the file system contents.

Restoring it will be doing the same command in reverse: dd if=/image of=/dev/sda
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Best way to back up an install of Debian?