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.

0

OpenERP 6.1 - How to (re)create a test database

By
sparenton
on 5/30/13, 11:46 AM 1,551 views

Hi,

We have an OpenERP setup that has 2 databases : One production and one test. The problem is that the test database is quite old and not accurate, so our tests cannot be reliable. My question is surely quite simple, but i'm inexperienced enough to be unsure about it...

On the login script, a user can access the "manage database" menu which let the user the ability of creating, backuping, restoring DBs. We're dumping our production database every 24H. Is it possible to restore the production dump into the test database with a simple action ? I'm afraid of the dump to have the "production" name in it and therefore induce some restore problem (but i may be wrong)...

What is the simplest and most reliable method to copy our production database into the existing test database ?

Thnaks in advance for your answers.

regards

0
sparenton
On 5/30/13, 12:17 PM

yes Clement, only one server and 2 DBs. So far, we're not running virtual server, but maybe in the future.

0
Clément THOMAS
On 5/30/13, 12:11 PM

I think sparenton want to have one server with 2 db. I have no experience with "manage database" menu, but, you can use pgAdmin to manage your databases.

In pgAdmin :

  1. Connect your server
  2. Right click on a database, and backup it (I use custom format).
  3. Create new database (with the same owner than production database)
  4. Restore your backup.

You can use "cron" in a linux server to do a backup periodically.

An other way to duplicate database (but you must stop openerp server) :

  1. Close all connections to your production database
  2. Connect to postgres database
  3. Launch SQL command : "create database my_duplication_of_prod_db with template prod_db"

I don't know what's your infrastructure but another (more secure) alternative to backup your openerp server if you work with virtualization is to backup entirety of VM (that's the best I think but not everyone works with virtualization).

0

Gustavo

--Gustavo--
950
| 2 1 4
Buenos Aires, Argentina
--Gustavo--

Python developer, big fan of sailing

Gustavo
On 5/30/13, 11:52 AM

Copy your OpenERP source code along with the libraries and configuration to another server. After that restore the database backup you created with pg_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: 5/30/13, 11:46 AM
Seen: 1551 times
Last updated: 3/16/15, 8:10 AM