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

Re: How to restore backup





On Fri, Feb 24, 2012 at 11:04 AM, Steven Marshall <..hidden..> wrote:
On Fri, Feb 24, 2012 at 10:28 AM, Chris Travers <..hidden..> wrote:
I think at this point we should take this up on the pgsql-general list.  If you are getting segfaults on the backup, I am not quite sure what is going on here.  Our backup program is just a simple wrapper around pg_dump.

You can try this with:

pg_dump -F c -f test.bak my_db_name

try to restore and see if you get the same error.  If you do we need to take that up with the Pg folks.

Best Wishes,
Chris Travers

Doing as you suggested it seems to partially work outside of Ledgersmb.

..hidden..:~> pg_dump -F c -f test.bak StallusBoutique_Test
..hidden..:~> pg_restore -d StallusBoutique test.bak
.
< I get a bunch of errors similar to the sample errors below which I assume is expected since I created the DB via setup.pl>
.
pg_restore: [archiver (db)] Error from TOC entry 3662; 2606 32116 FK CONSTRAINT voucher_trans_id_fkey ledgersmb
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "voucher_trans_id_fkey" for relation "voucher" already exists
    Command was: ALTER TABLE ONLY voucher
    ADD CONSTRAINT voucher_trans_id_fkey FOREIGN KEY (trans_id) REFERENCES transactions(id);
pg_restore: [archiver (db)] Error from TOC entry 3695; 2606 32580 FK CONSTRAINT yearend_trans_id_fkey ledgersmb
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "yearend_trans_id_fkey" for relation "yearend" already exists
    Command was: ALTER TABLE ONLY yearend
    ADD CONSTRAINT yearend_trans_id_fkey FOREIGN KEY (trans_id) REFERENCES gl(id);


I logged into my new database successfully.  I was brought to my preferences page where I needed to update my password before it expired.  It appears that none of my users and customers though were restored.  All my inventory though was there.  Instead of creating my initial DB via setup.pl, should I have instead created a blank DB using template0 or template1 and then used my backup to restore into it?
--
Best Regards,
Steven Marshall



I dropped my new DB and then recreated it as a blank DB without using setup.pl.  Then executed the following successfully using the backup created via pg_dump:

..hidden..:~> pg_restore -d StallusBoutique test.bak 

All my users and customers are there.  I then dropped this database and recreated it again as a blank DB without using setup.pl.  This time though I tried restoring from the backup created via Ledgersmb and this fails.

..hidden..:~> pg_restore -d StallusBoutique backup_StallusBoutique_Test_2012-02-24.bak
Segmentation fault
..hidden..:~>

It appears the problem relates to the backup being created via Ledgersmb.
--
Best Regards,
Steven Marshall


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users