gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] BACKUP / RESTORE


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] BACKUP / RESTORE
Date: Thu, 16 Oct 2008 11:20:05 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Oct 15, 2008 at 09:02:45PM -0300, Rogerio Luz wrote:

> Made the copy of the .conf files to /etc/gnumed and made a backup (very long
> name.tar)
> 
> Then after trying to run the restore script gives:

...

> ==> Testing backup file integrity ...
> 
> /home/rogerio/Desktop/backup-gnumed_v9-GNUmed_Team-casa-deb-2008-10-15-21-19-03-data_only.tar:
> bad magic number (file not created by bzip2)
> 
> You can use the `bzip2recover' program to attempt to recover
> data from undamaged sections of corrupted files.
> 
>     ERROR: integrity check failed, aborting

The backup process we provide does this:

- dump roles
- dump data and schema
- concatenate them (.tar)
- *bzip2* them
- optionally let them be signed by a digital notary

Now, this is broken into two processes - dump+concatenate
and zip+sign. That way machine load can be spread more
evenly. I usually run both scripts by cron. The second
script picks up the resulting files of the first. The most
important reason for the split is that this way files *will*
eventually get zipped and signed even if the machine happens
to be switched off after dumping.

Your backup has been dumped and concatenated but not zipped.
This is no problem, however. The problem is rather that our
*restore* script did not take into account that someone
might want to restore from .tar files. They might prefer
that because they have very large hard drives but little
time to wait for the zip process to finish or because the
machine has a CPU which would take days to zip.

I have enhanced the restore script to only bunzip2 if the
backup ends in .bz2 so it will work with plain .tar, too.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

Attachment: gm-restore_database.sh
Description: Bourne shell script


reply via email to

[Prev in Thread] Current Thread [Next in Thread]