backup & Restore Newgenlib

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

backup & Restore Newgenlib

Darshangera
Hi all,
We are running Newgenlib 2.5 version. I am taking backup of DB through pgadmin tool of postgresql. But when i try to restore the same on a new installation, its failing. Can some one give detail steps how u take back up as well as restoring on a new installation so that in case of failure we can recover. It will be of great help. Thanks
With regards,
Darshan
Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

verussolutions
Administrator
1. Which operating System are you using Windows or Linux? Also mention the version/distribution
2. What error are you encountering in pgadmin3? Can give more details about the error
Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

Darshangera
1.) We are using Win 2003 OS..
2.) After taking backup in plain data format, when i try to restore, then OK button does not get enabled at all.
So backup was taking using compressed format and when we try to restore, it fails saying restore aborted after inserting few tables saying Unique constraint violated..

It will be kind of you to suggest how u take back up and restore in your set up..
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

verussolutions
Administrator
If you are taking a backup in plain sql format, then you cannot restore it using pgadmin3. Restoration can be done using the compressed format only.

Using your command prompt go to C:/Program files/postgresql/8.0/bin directory.
1. Type this command psql -d newgenlib -U postgres
2. You will get a prompt newgenlib-# or something like this
3. Now enter \i <path of the plain sql format>

If you have a database that is working fine; do not use above commands
However if you have a database that is blank (with out newgenlib schema) then you can use the above commands
Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

Darshangera
Thanks for prompt reply.
I will try plain backup using command line. How can I restore from compressed backup using pgadmin3?

Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

Darshangera
Hi, When I tried restoring from plain backup, the file generated from backup has extension .backup. Its not a sql file.

C:\Program Files\PostgreSQL\8.0\bin>psql -d newgenlib -U postgres
Password:
Welcome to psql 8.0.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

Warning: Console code page (437) differs from Windows code page (1252)
         8-bit characters may not work correctly. See psql reference
         page "Notes for Windows users" for details.

newgenlib=# \i \\internetimaging\d$\Newgenlib\25_oct_2010NewGenlIb.backup
\i: missing required argument
newgenlib=# \i \\internetimaging\d$\Newgenlib\25_oct_2010NewGenlIb.backup
\i: missing required argument
newgenlib=# \i \\internetimaging\d$\Newgenlib\13Nov2010-1.backup
\i: missing required argument
Could guide exact steps? We have a working newgenlib set up. I have taken backups using pgadminIII tool. I want to restore using this back up on a new setup so that when  live server fails, i can immediately recover.

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

Darshangera

Take Plain backup of Db along with insert command option from working environment.

Then go to restore server and execute following:

C:\Program Files\PostgreSQL\8.0\bin
psql -d newgenlib -U postgres
\i c:/backupfilename.backup

It works
Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

gabzy
In reply to this post by Darshangera
Do I have to delete all tables and schema for the above command (\i backup_file.sql) to work?
Reply | Threaded
Open this post in threaded view
|

Re: backup & Restore Newgenlib

gabzy
I have been unsuccessful in restoring a newgenlib database backup which I made on windows 2012 server. I restored the backup on CentOS7 server. I executed AddedScripts.sql, V31AddedScripts.sql, and then lastly NGLIndexer.jar.

But after running catalina to startup the tomcat server, the OPAC displays a blank page and the Client.jar can no longer access the back end.

Any help is greatly appreciated