콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
6944 화면

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

아바타
취소
작성자 베스트 답변

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

아바타
취소
베스트 답변

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).

아바타
취소
베스트 답변

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

아바타
취소