gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] BACKUP / RESTORE


From: Rogerio Luz
Subject: Re: [Gnumed-devel] BACKUP / RESTORE
Date: Thu, 16 Oct 2008 16:42:06 -0300

Did not work, gives:

address@hidden:~/Desktop/Gnumed/GNUmed-v9/server$ sh gm-restore_database.sh backup-gnumed_v9-GNUmed_Team-casa-deb-2008-10-15-21-19-03-data_only.tar

==> Trying to restore GNUmed backup ...
    file: backup-gnumed_v9-GNUmed_Team-casa-deb-2008-10-15-21-19-03-data_only.tar

==> Reading configuration ...
    file: /etc/gnumed/gnumed-restore.conf

==> Setting up workspace ...
mkdir: pasta (directory) `/home/rogerio/gnumed/gm-restore-2008-10-16-16-35-33/' criada (created)

==> Creating copy of backup file ...
cp: impossível fazer stat em (impossible to do stat in) `backup-gnumed_v9-GNUmed_Team-casa-deb-2008-10-15-21-19-03-data_only.tar': Arquivo ou diretório não encontrado (file or directory not found)

==> Unpacking backup file ...
tar: /home/rogerio/gnumed/gm-restore-2008-10-16-16-35-33//backup-gnumed_v9-GNUmed_Team-casa-deb-2008-10-15-21-19-03-data_only.tar: Não é possível open: Arquivo ou diretório não encontrado
tar: Erro não é recuperável: saindo agora
(Not possible to open: File or directory not found
tar: Error not recoverable: exiting now)

==> Adjusting GNUmed roles ...

   You will now be shown the roles backup file.
   Please edit it to only include the roles you need for GNUmed.

   Remember that in PostgreSQL scripts the comment marker is "--".

   Press <ENTER> to continue.

head: não foi possível abrir (not possible to open) `/home/rogerio/gnumed/gm-restore-2008-10-16-16-35-33//backup-gnumed_v9-GNUmed_Team-casa-deb-2008-10-15-21-19-03-data_only.tar-database.sql' para leitura: Arquivo ou diretório não encontrado (for reading: File or Directory not found)

Rogerio.

PS: Why can´t I make a bzip2 file? I have it installed, or is it a .conf I have to change?


==> Checking for existence of target database  ...
    ERROR: backup does not create target database, aborting



2008/10/16 Karsten Hilbert <address@hidden>
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

_______________________________________________
Gnumed-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnumed-devel



reply via email to

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