* [gentoo-user] backup & restore solution?
@ 2005-07-30 17:24 Jarry
2005-07-30 17:58 ` Chris Cox
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Jarry @ 2005-07-30 17:24 UTC (permalink / raw
To: gentoo-user
Hi,
I am now looking for some sort of backup & restore solution which would
help me to get my gentoo-server up and running after fatal disk failure.
I want to burn at regular intervals compressed partition images of disk
on internal dvd/rw/ram (4.5 GB should be enough for archiving the whole
disk, without /home partition).
But what I also need is fast and reliable restore function, for the case
that all I have is a new replacement-disk, gentoo installation cd, and
dvd/rw/ram with archived partition images (+ restore sw on floppy).
Could you recommend me some software? I checked software in app-backup,
but there is nothing about quick & easy restoring...
Jarry
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-30 17:24 [gentoo-user] backup & restore solution? Jarry
@ 2005-07-30 17:58 ` Chris Cox
2005-07-31 17:41 ` [gentoo-user] " James
2005-07-30 18:14 ` [gentoo-user] " Neil Bothwick
2005-07-31 11:48 ` Richard Fish
2 siblings, 1 reply; 11+ messages in thread
From: Chris Cox @ 2005-07-30 17:58 UTC (permalink / raw
To: gentoo-user
On Saturday 30 July 2005 12:24 pm, Jarry wrote:
> Hi,
>
> I am now looking for some sort of backup & restore solution which would
> help me to get my gentoo-server up and running after fatal disk failure.
>
> I want to burn at regular intervals compressed partition images of disk
> on internal dvd/rw/ram (4.5 GB should be enough for archiving the whole
> disk, without /home partition).
>
> But what I also need is fast and reliable restore function, for the case
> that all I have is a new replacement-disk, gentoo installation cd, and
> dvd/rw/ram with archived partition images (+ restore sw on floppy).
> Could you recommend me some software? I checked software in app-backup,
> but there is nothing about quick & easy restoring...
>
> Jarry
Well, what I've been thinking about doing on my system is getting a removable
5.2" hot-swappable drive bay and then buying a 250GB (or bigger) EIDE drive
to stick in the bay. Then create a few partitions on the drive and use rsync
in cron.daily to keep a daily backup. After its done, just have it umount
the drive and I would always be able to remove it from the computer and even
be able to attach it to my other computer for another backup of its files.
Thats just what I've been thinking, I'm sure others have better ways to keep
backups.
--
Chris
Linux 2.6.12-gentoo-r6 i686 AMD Athlon(tm) XP
12:51:48 up 6 days, 4:25, 9 users, load average: 0.00, 0.03, 0.03
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-30 17:24 [gentoo-user] backup & restore solution? Jarry
2005-07-30 17:58 ` Chris Cox
@ 2005-07-30 18:14 ` Neil Bothwick
2005-07-31 11:48 ` Richard Fish
2 siblings, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2005-07-30 18:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
On Sat, 30 Jul 2005 19:24:06 +0200, Jarry wrote:
> But what I also need is fast and reliable restore function, for the case
> that all I have is a new replacement-disk, gentoo installation cd, and
> dvd/rw/ram with archived partition images (+ restore sw on floppy).
> Could you recommend me some software? I checked software in app-backup,
> but there is nothing about quick & easy restoring...
For restoring entire partitions, backups made with tar or partimage are
good. In either case, a single command is all you need to restore the
partition.
--
Neil Bothwick
Like an atheist in a grave: all dressed up and no place to go.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-30 17:24 [gentoo-user] backup & restore solution? Jarry
2005-07-30 17:58 ` Chris Cox
2005-07-30 18:14 ` [gentoo-user] " Neil Bothwick
@ 2005-07-31 11:48 ` Richard Fish
2005-07-31 14:12 ` Jarry
2005-07-31 20:29 ` Neil Bothwick
2 siblings, 2 replies; 11+ messages in thread
From: Richard Fish @ 2005-07-31 11:48 UTC (permalink / raw
To: gentoo-user
Jarry wrote:
> Hi,
>
> I am now looking for some sort of backup & restore solution which would
> help me to get my gentoo-server up and running after fatal disk failure.
>
> I want to burn at regular intervals compressed partition images of disk
> on internal dvd/rw/ram (4.5 GB should be enough for archiving the whole
> disk, without /home partition).
Well, tar and cpio are good choices because they are available on the
Gentoo live CD. If you chose another program, you will just need to
make sure that you have a static binary of it available at recovery time
(copying this to your recovery media is the best choice).
I am currently using 'dar' to backup to external USB hard disk. Dar is
also useful for backing up to DVD media though, because it has good
support for creating archive 'slices' that will fit nicely on a DVD,
just in case you decide to backup /home as well.
It is in portage, but if you are interested, check out
http://dar.linux.free.fr/
For 'quick-and-easy' restoring, I'm not aware of anything that really
automates the process. But generally the steps are:
1. fdisk
2. mkfs
3. mount
4. restore files
5. chroot
6. install boot loader
7. reboot
The difficulty in restoring the files will really depend upon how you
make your backups (always full, incrementals, differentials, etc). A
full backup would always be the easiest, as you only need a single
piece/set of media and one command to do the restore.
The rest of the steps are pretty much exactly the same as for when you
installed Gentoo, so there shouldn't be any real surprises there.
One last thing, if you've only got a single CD/DVD drive, you are
probably going to have an issue to have both the live CD and the backup
media available, since you can't really eject the live CD to insert your
backup disk.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-31 11:48 ` Richard Fish
@ 2005-07-31 14:12 ` Jarry
2005-07-31 15:12 ` Richard Fish
2005-07-31 20:29 ` Neil Bothwick
1 sibling, 1 reply; 11+ messages in thread
From: Jarry @ 2005-07-31 14:12 UTC (permalink / raw
To: gentoo-user
Richard Fish wrote:
> I am currently using 'dar' to backup to external USB hard disk.
I thought of this too, but I don't know how to "power-off" usb-disk
remotelly. On the other side, after burning and unmounting dvd-r,
dvd-drive stops spinning (kind of overheating protection)...
> 5. chroot, 6. install boot loader
Is it not possible to archive MBR too? That way I could save 5. and
6., and to automate it with some scripts...
> One last thing, if you've only got a single CD/DVD drive, you are
> probably going to have an issue to have both the live CD and the backup
Time to look for an old dvd-rom drive...
Jarry
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-31 14:12 ` Jarry
@ 2005-07-31 15:12 ` Richard Fish
2005-07-31 18:08 ` Bastian Balthazar Bux
0 siblings, 1 reply; 11+ messages in thread
From: Richard Fish @ 2005-07-31 15:12 UTC (permalink / raw
To: gentoo-user
Jarry wrote:
>
> Is it not possible to archive MBR too? That way I could save 5. and
> 6., and to automate it with some scripts...
Technically, yes, I guess you could do this. Although, I don't know if
I would really recommend it.
If you are using a stage 1.5 with grub, you would need to archive the
first 63 blocks of the disk (technically fewer than that, but you would
have to check grub-install's output to be sure of the exact count, and
63 is the safe number). This is because grub embeds the stage1.5 loader
after the mbr (first block) and the start of the first partition.
If you are not using the stage 1.5, or you are using lilo, then you have
little choice but to reinstall the boot loader. This is because some
files in /boot are block mapped into the mbr, and the restore process
may have changed the layout of these files, so the block map will be
incorrect.
I think the safest route is to always let the system write a fresh mbr.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: backup & restore solution?
2005-07-30 17:58 ` Chris Cox
@ 2005-07-31 17:41 ` James
0 siblings, 0 replies; 11+ messages in thread
From: James @ 2005-07-31 17:41 UTC (permalink / raw
To: gentoo-user
Chris Cox <yeahsowhat <at> gmail.com> writes:
> > I am now looking for some sort of backup & restore solution which would
> > help me to get my gentoo-server up and running after fatal disk failure.
> > I want to burn at regular intervals compressed partition images of disk
> > on internal dvd/rw/ram (4.5 GB should be enough for archiving the whole
> > disk, without /home partition).
emerge -s amanda
www.amanda.org
Amanda is a very stable and mature backup technology for all sorts of
different needs. Once setup Amanda can do anything you want
to do. It also supports a wide variety of devices.
It's a good way to impress a company/boss where a company has suffered
from less than robust backup/restore capabilities......
It may be overkill, but, a network backup solution is a good thing to
have. You can even backup a friend's machine.
James
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-31 15:12 ` Richard Fish
@ 2005-07-31 18:08 ` Bastian Balthazar Bux
2005-07-31 18:40 ` Richard Fish
0 siblings, 1 reply; 11+ messages in thread
From: Bastian Balthazar Bux @ 2005-07-31 18:08 UTC (permalink / raw
To: gentoo-user
Richard Fish wrote:
> Jarry wrote:
>
>>
>> Is it not possible to archive MBR too? That way I could save 5. and
>> 6., and to automate it with some scripts...
>
>
>
> Technically, yes, I guess you could do this. Although, I don't know if
> I would really recommend it.
>
> If you are using a stage 1.5 with grub, you would need to archive the
> first 63 blocks of the disk (technically fewer than that, but you would
> have to check grub-install's output to be sure of the exact count, and
> 63 is the safe number). This is because grub embeds the stage1.5 loader
> after the mbr (first block) and the start of the first partition.
>
> If you are not using the stage 1.5, or you are using lilo, then you have
> little choice but to reinstall the boot loader. This is because some
> files in /boot are block mapped into the mbr, and the restore process
> may have changed the layout of these files, so the block map will be
> incorrect.
>
> I think the safest route is to always let the system write a fresh mbr.
>
> -Richard
>
It make sense but is easily bypassable using "hda1" as boot partition
AND it's the first on disk, with a little help from "fdisk" and "dd"
("##" are shell commands "#" comm.inside fdisk):
==== hikky trikky ====
##fdisk /dev/hda
#Command (m for help): u
Changing display/entry units to sectors
#Command (m for help): p
Disk /dev/hda: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders, total 78177792 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 63 979964 489951 83 Linux
#Command (m for help): q
##dd if=/dev/hda of=MBR-boot.backup bs=512 count=489951
==== hikky trikky ====
MBR-boot.backup now contain your MBR + the boot partition.
now three question:
a) I know noone that use this backup method, is it affidable ?
b) What happen if it need to be restored on another disk
c) HOW do I restore (hint "man dd")
Another hint: always try at least one restore after a choice of backup
method, the rule is "you never know" .
cheers
Francesco
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-31 18:08 ` Bastian Balthazar Bux
@ 2005-07-31 18:40 ` Richard Fish
2005-07-31 18:58 ` Bastian Balthazar Bux
0 siblings, 1 reply; 11+ messages in thread
From: Richard Fish @ 2005-07-31 18:40 UTC (permalink / raw
To: gentoo-user
Bastian Balthazar Bux wrote:
>
> Device Boot Start End Blocks Id System
>/dev/hda1 * 63 979964 489951 83 Linux
>#Command (m for help): q
>
>##dd if=/dev/hda of=MBR-boot.backup bs=512 count=489951
>
>
You missed a few! :-)
The actual number of 512-byte blocks is 979964 - 63 + 1 = 979902.
Fdisk always reports 1k blocks in the "Blocks" column. Or if an odd
number of 512-byte blocks, the number of 1k blocks with a '+' afterwards.
Plus, you want the mbr as well, plus whatever is between blocks 0 and
63, so better option might be:
dd if=/dev/hda of=parttbl+mbr+boot.backup bs=512 count=979965
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-31 18:40 ` Richard Fish
@ 2005-07-31 18:58 ` Bastian Balthazar Bux
0 siblings, 0 replies; 11+ messages in thread
From: Bastian Balthazar Bux @ 2005-07-31 18:58 UTC (permalink / raw
To: gentoo-user
Richard Fish wrote:
> Bastian Balthazar Bux wrote:
>
>>
>> Device Boot Start End Blocks Id System
>> /dev/hda1 * 63 979964 489951 83 Linux
>> #Command (m for help): q
>>
>> ##dd if=/dev/hda of=MBR-boot.backup bs=512 count=489951
>>
>>
>
> You missed a few! :-)
>
> The actual number of 512-byte blocks is 979964 - 63 + 1 = 979902.
>
> Fdisk always reports 1k blocks in the "Blocks" column. Or if an odd
> number of 512-byte blocks, the number of 1k blocks with a '+' afterwards.
>
> Plus, you want the mbr as well, plus whatever is between blocks 0 and
> 63, so better option might be:
yay, crossing eyes: s/so better option might be/the right option is/
>
> dd if=/dev/hda of=parttbl+mbr+boot.backup bs=512 count=979965
>
>
> -Richard
>
Otherwise you can simply read the value under "End" (+1) instead of the
one under "Blocks" ;)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] backup & restore solution?
2005-07-31 11:48 ` Richard Fish
2005-07-31 14:12 ` Jarry
@ 2005-07-31 20:29 ` Neil Bothwick
1 sibling, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2005-07-31 20:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]
On Sun, 31 Jul 2005 13:48:09 +0200, Richard Fish wrote:
> For 'quick-and-easy' restoring, I'm not aware of anything that really
> automates the process. But generally the steps are:
>
> 1. fdisk
> 2. mkfs
> 3. mount
> 4. restore files
> 5. chroot
> 6. install boot loader
> 7. reboot
Partition image will handle everything by stage 1 with a single command.
You may need to run the bootloader to set it up,although there is an
option in partimage to backup the MBR.
> One last thing, if you've only got a single CD/DVD drive, you are
> probably going to have an issue to have both the live CD and the backup
> media available, since you can't really eject the live CD to insert
> your backup disk.
Doesn't The Gentoo CD have an option to load the compressed filesystem
into RAM, so you can unmount the CD? If it doesn't, plenty of others do.
It doesn't have to be a Gentoo CD, just any live Cd containing the
necessary restore commands.
Another alternative is to include the Live CD components on the DVD, so
you have a full restore from a single bootable disc. This normally
involves copying the contents of the Live CD to the DVD image and using
the mkisofs arguments listed in the isolinux documentation to make it
bootable.
--
Neil Bothwick
Did you know that eskimos have 17 different words for linguist ?
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-07-31 20:29 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-30 17:24 [gentoo-user] backup & restore solution? Jarry
2005-07-30 17:58 ` Chris Cox
2005-07-31 17:41 ` [gentoo-user] " James
2005-07-30 18:14 ` [gentoo-user] " Neil Bothwick
2005-07-31 11:48 ` Richard Fish
2005-07-31 14:12 ` Jarry
2005-07-31 15:12 ` Richard Fish
2005-07-31 18:08 ` Bastian Balthazar Bux
2005-07-31 18:40 ` Richard Fish
2005-07-31 18:58 ` Bastian Balthazar Bux
2005-07-31 20:29 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox