Backups: Difference between revisions
how to do backups with Mondo Rescue |
greatly expanding this artilce; interim save |
||
| Line 1: | Line 1: | ||
There are | == Types of Backups == | ||
There are three primary use cases or types of backups: | |||
<ul style="list-style-type : upper-roman;"> | |||
<li><strong>Operational</strong>: Routine (e.g. daily) backups - especially in a networked multi-user environment for operational resiliency and efficiency</li> | |||
<li><strong>File</strong>: "Full" file system archive to online storage before re-building a host (completely reformatting disks and partitions)</li> | |||
<li><strong>System Image</strong>: A complete operating system image to allow either cloning to new hardware, or full system restoration</li> | |||
</ul> | |||
== Example Use Cases == | |||
<ul style="list-style-type : upper-roman;"> | |||
<li> I accidentally deleted a file, and I want to get it back (without having to call Tech Services) and if I can't get my file back, I want to blame tech services</li> | |||
<li> I want to make an online (meaning network accessible) archive of my old machine before I wipe it completely to turn it into a Media Center PC (Using Mythbuntu or LinuxMCE)</li> | |||
<li> I want to making a full system backup of my notebook before I do a distribution upgrade from Kubuntu 8.4 to Kubuntu 8.10 -- just in case the upgrade doesn't go smoothly so that I can revert and start again, or revert and work on resolving blockers.</li> | |||
</ul> | |||
Given the different goals of what one might mean by the term "backup", there are naturally different solutions that work best in each scenario. If you are a technical user, you must get familiar with [http://samba.anu.edu.au/rsync RSync]. Even when you need to employ other systems or tools, RSync is the swiss army knife of backups. | |||
== Archive the old workstation == | == Operational Backups == | ||
Scenario A (Operational Backups) is very much like Scenario B (File Backups), with the distinction that it obviously multiplies the number of machines included, and is meant to persist through time as a component of your organization's operations and disaster recovery plans. You may effectively use these techniques in your home or home office just as much as they benefit businesses. | |||
=== Tools === | |||
You [http://finmath.uchicago.edu/~wilder/Security/rsync/ could use RSync here], but by the time you get into the complexity of operational backups, you probably want to employ an application that offers even more flexibility, administration and power. | |||
One of, if not the best, solutions for operational backups is AMANDA. AMANDA is both an open source project, and commercially supported through the [http://www.zmanda.com/ Zmanda corporation]. | |||
[[Image:Chart-amanda-network-no-brd.jpg|right]] | |||
# [http://www.amanda.org/ AMANDA] project | |||
# [http://amanda.zmanda.com/ AMANDA wiki] | |||
# [http://www.backupcentral.com/components/com_mambowiki/index.php/AMANDA Backup Central wiki article] | |||
=== Resources === | |||
# [[wp:Category:Free_backup_software]] | |||
# [http://linux.com/features/150600 TimeVault simplifies data backup for Ubuntu] | |||
== File Backups == | |||
This could also be called "Application Backups", because oftentimes, the goal in this category is to make a backup of an application prior to making major changes to the application, such as an upgrade. Or, it could be close to copying every file on a particular computer to some backup location. One distinction that I think characterizes "file backups" compared with "operational backups" is duration. If the backup is motivated by the thinking "Let's put this somewhere where we can still get at it for a while but we'll eventually throw away the backup when we're sure we have everything we need moved or migrated" This is a file backup. You still could be backing up nearly a full operating system, but you're probably not interested in applications as much as their settings and configurations. In many "File Backups" scenarios, you have a specific set of files that you're targeting. For example, "We're going to do a full upgrade of the website, so let's create a backup of the site before the upgrade." Another distinction is who is doing the backup. I consider "File backups" to be initiated by the user (even if that user is a system administrator, developer or database administrator) whereas Operational Backups "just happen" (with a Technology Services or other operations team responsible for making them happen). | |||
=== Example 1: Archive the old workstation === | |||
These are the disks that I have to preserve by copying the good, throwing away the bad. | These are the disks that I have to preserve by copying the good, throwing away the bad. | ||
| Line 16: | Line 45: | ||
Units = cylinders of 16065 * 512 = 8225280 bytes | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
Device Boot Start End Blocks Id System | |||
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS | /dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS | ||
/dev/hda2 2551 2633 666697+ 7 HPFS/NTFS | /dev/hda2 2551 2633 666697+ 7 HPFS/NTFS | ||
| Line 28: | Line 57: | ||
Units = cylinders of 1008 * 512 = 516096 bytes | Units = cylinders of 1008 * 512 = 516096 bytes | ||
Device Boot Start End Blocks Id System | |||
/dev/hdb1 1 158816 80043232+ 83 Linux | /dev/hdb1 1 158816 80043232+ 83 Linux | ||
</pre> | </pre> | ||
| Line 53: | Line 82: | ||
shows you what file system types are supported under your currently running kernel | shows you what file system types are supported under your currently running kernel | ||
== Backups for Disaster | |||
So, when it came to using a backup program, I chose Mondo Rescue because it can backup to CD, DVD, disk or other mediums. Plus, it can create a restore | == System Image aka Backups for Disaster Recovery == | ||
disk for you which is what I want... in the case of catastrophic system failure, I want to be able to recreate my computer on new hardware. | So, when it came to using a backup program, I chose [http://www.mondorescue.org/index.html Mondo Rescue] because it can backup to CD, DVD, disk (e.g. external USB drive) or other mediums like tape drives. Plus, it can create a restore disk for you which is what I want... in the case of catastrophic system failure, I want to be able to recreate my computer on new hardware. | ||
I have an external USB hard drive with a terabyte of storage that I have mounted at /media/disk | I have an external USB hard drive with a terabyte of storage that I have mounted at /media/disk | ||
| Line 69: | Line 98: | ||
-d /media/disk/backups # write ISOs to this directory \ | -d /media/disk/backups # write ISOs to this directory \ | ||
-s 4420m # make the ISOs 4,420 MB is size (smaller than a DVD) \ | -s 4420m # make the ISOs 4,420 MB is size (smaller than a DVD) \ | ||
-S /media/disk/tmp # write scratch files to this directory | -S /media/disk/tmp # write scratch files to this directory | ||
-T /media/disk/tmp # write temporary files to this directory | -T /media/disk/tmp # write temporary files to this directory | ||
</source> | </source> | ||
At first, the backup failed with a message that it thought my drive was full. But in reality, it was a problem with the tmp partition being too small so then I added the -S and -T options and it worked fine. | At first, the backup failed with a message that it thought my drive was full. But in reality, it was a problem with the tmp partition being too small so then I added the -S and -T options and it worked fine. | ||
This is what mondoarchive said after I used the -T and -S options to do the run | This is what mondoarchive said after I used the -T and -S options to do the run | ||
| Line 93: | Line 122: | ||
</pre> | </pre> | ||
Basically, I have to | Basically, I have to | ||
"reduce your kernel's size" | "reduce your kernel's size" | ||
if I want to create a boot floppy, but it doesn't matter if I want to use a boot ISO instead. | if I want to create a boot floppy, but it doesn't matter if I want to use a boot ISO instead. | ||