Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
12 Odpowiedzi
20513 Widoki

I have a saas version of openerp and have made a backup of my database from the control centre. This produces a .zip file which extracts to a filestore folder (with sub-folders) and sql file. How can I now restore this to a local version of openerp? Do I use pgadmin as the local "manage database" option looks for a .bak file?

This issue was also raised in https://www.odoo.com/forum/help-1/question/export-setting-and-data-from-odoo-com-to-local-odoo-server-installation-54962 without a satisfactory answer.

 

Awatar
Odrzuć
Najlepsza odpowiedź

On the local Server do this

# sudo su odoo (your user)
# dropdb database_name
# createdb database_name
# cd /to/your/dump/path
# psql -f dump.sql database_name

Copy the filestore content, on my server /opt/odoo/.local/share/Odoo/filestore/database_name

 

Awatar
Odrzuć
Najlepsza odpowiedź

If you are working on linux, and if it can be of your interest, I have made 2 scripts, the first to make backup, and the other one to restoring.

The backup script can be combined with cron to make schudeled backups for a default database, or whatever database you want. This backup script creates a compressed backup with a name compound by the database name and the date of the backup. Also it creates (or overwrites) a backup file called yourdb_last_backup, wich is very comfortable to use with the restore script. Using the restore script without parameters, restores the last backup, or you can restore your desired file indicating it as parameter.

Other interesting functions of these scripts are addons backup, and autodelete backups older than the days of your choice.

If you would like to try these scripts contact me. I hope it helps.

Awatar
Odrzuć

Scripts sended. Enjoy them :)

Can you please mail me your scripts ekitsikpui5@me.com

if anyone is interested in these scripts, I uploaded them to github: https://github.com/roberto-barreiro/odoo_backup_scripts

Thank you. Just when I needed it: )
On Apr 20, 2015, at 10:34 AM, Roberto Barreiro <roberto-disgal.es@mail.odoo.com> wrote:

if anyone is interested in these scripts, I uploaded them to github: https://github.com/roberto-barreiro/odoo_backup_scripts

--
Roberto Barreiro
Sent by Odoo S.A. using Odoo about Forum Post False

Najlepsza odpowiedź

DELETED

Awatar
Odrzuć
Najlepsza odpowiedź

You can do what Franz says but you can also do this all in one command.

You dump the database and pipe it directly into another one.

sudo -u postgresql pg_dump -h host1 dbname | psql -h host2 dbname (pg_dump -h host1 dbname | psql -h host2 dbname is taken directly from the PostgreSQL documentation)

So Let's say you have:

host1: openerp.example.com with username openerp

dbname host1: openerp

host2 : local (so leave this blank because it will go for localhost when nothing is mentioned)

dbname host2: whatever you like.

You will use

pg_dump -h openerp.example.nl "dbname" | psql "dbname"

 

Good luck!

 

Awatar
Odrzuć
Najlepsza odpowiedź

How can id do the backup.  

i also don´t know where is  "control centre."



Awatar
Odrzuć
Najlepsza odpowiedź

hello,

you have first to ask Odoo about the version running your saas service and build the same.

Then do the restoration of the sql file as explained.

If your server is compatible with the database, you should succeed in starting your server with the --update option and check the log. If this test fails,your server is likely to be uncompatible. For example, it doesn't work with a standard V8.0.

regards

Awatar
Odrzuć
Najlepsza odpowiedź

Hi Franz how can I get the scripts?
I would like to set it in the crontab.

Regards
Erastus

Awatar
Odrzuć
Najlepsza odpowiedź

@David Searle :

Where do I find the control center ? What is the menu to use ?

I could not find any where a command to export data from the database ! ? !

Any help would be apreciated !

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
9
kwi 25
62606
how to backup ? Rozwiązane
9
lip 24
94361
1
lip 22
4102
0
kwi 22
50
2
mar 22
3405