Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

I want to backup my database from my VPS s/m regularly&restore when needed,But i have an issue in restoration.Help me to solve

By
Remya
on 6/13/14, 7:44 AM 745 views

I have backup my database using the below code. 

filename="/var/pgdump/${db}_${date}.sql"
pg_dump ${db} -U openerp -w -h localhost -f $filename

When i restore the same database through the interface, it creates a new database.

When i run psql -U postgres -d check -1 -f database_20140611_2300080974977.sql this command, it shows error.

How can i restore database, which backup using above command?

Or any other solution(backup through command and restore through command or interface)?

 

2

Remya

--Remya--
5813
| 7 8 8
Thiruvananthapuram, India
--Remya--

Working as an Senior ODOO developer. http://in.linkedin.com/pub/remya-r/69/a23/298

Remya
On 7/14/14, 6:50 AM

Backup database :- 

pg_dump --cluster 9.1/main --format=c old_database_name > new_database_name

Restore database :-

DB=new_database_name && createdb --cluster 9.1/main $DB && pg_restore --cluster 9.1/main --no-acl -O -d $DB <  backup_database_name.dump

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/13/14, 7:44 AM
Seen: 745 times
Last updated: 3/16/15, 8:10 AM