health
[Top][All Lists]
Advanced

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

Re: [Health] Database Backup not found


From: Luis Falcon
Subject: Re: [Health] Database Backup not found
Date: Tue, 27 Sep 2016 11:10:34 +0000

Dear Khurram

On Mon, 26 Sep 2016 09:48:36 +0500
Khurram Shahzad <address@hidden> wrote:

> Dear All,
> 
> I backed up my GNU Health installation using following command:
> 
> gnuhealth-control backup --backdir /home/gnuhealth/backup/ --database
> hmis_test_db
> 
> Now, when I extract the compressed file, I can see the complete home
> directory of gnuhealth user. But, I am unable to find the backup of
> the database. Where can I find it?
> 
GNU Health control backup command creates two files on your destination
backup directory :

1) The compressed database dump: The format
is :backup_db-name_timestamp.gz

2) The database and filesystems for GNU Health.

If you only need the database dump, you use the file as in case 1
(backup_db-name_timestamp.gz). 

To restore, with the GNU Health user :

1) create a new database (

$ createdb your_db_name --encoding=unicode

2) Uncompress the database dump

$ gunzip backup_db-name_timestamp.gz

3) Restore the DB using psql

$ psql your_db_name < backup_db-name_timestamp

I'll document this restore procedure on Wikibooks.

Let us know how it went. 

Bests,

-- 
Dr. Luis Falcon, M.D., BSc
President, GNU Solidario
GNU Health: Freedom and Equity in Healthcare
http://health.gnu.org




reply via email to

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