Community mailing list archives
Re: SUMMARY: SEEKING: Method to script backups of Odoo v9 - also include filestore (anything else??)
Re: SUMMARY: SEEKING: Method to script backups of Odoo v9 - also include filestore (anything else??)by
Usually SQL to disable all from jobs. Not important for normal backup but extremely useful for the trunk database (you don't want 2 databases pulling the same mails)
From our experience, pgdump sometimes fails if database in use so we stop the instance and then dump the database. before zipping filestore we start it back to minimize the downtime.- stop instance- pgdump database- start instance- zip sql dump and filestore (zip is better if you might use database manager gui to restore)- send the backup file (sftp/s3 etc.)How do you manage to disable interfacing such as pop/e-mail, connectors etc on copy databases? Do you disable them manually with running some SQL?2015-12-31 3:35 GMT+02:00 Ray Carnes <email@example.com>:
MY ORIGINAL QUESTION:
Is scripting a backup of Odoo v9 as simple as pg_dump and copying the relevant filestore folder?
1. pg_dump -E UTF-8 -F p -b -f $filename $database
2. tar -zcvf filestore_$filename.gz $database
3. move both to the new server, restore dump and folder and update database ?
Does anyone know (have experience or a verified method for doing this) ?
I want to start testing how I can quickly move a database from one server to another.
> 1. pg_dump -E UTF-8 -F p -b -f $filename $database
in my scripts I use -O and -U options
-E UTF-8 -F p -b options should be useless
> 2. tar -zcvf filestore_$filename.gz $database>
> 3. move both to the new server, restore dump and folder and update database> ?
if target database already exists, dropdb after closing all connectionsrestoration with psql and tar -xzf for the filestorechange owner:group on filestore according to the new server
depending on your context, you may have to synchronize/adapt someoptions in the server config file and also the modules that users canupload from the apps.
A key point is to determine whether the copied database is a copy or areplacement of the main database. If a copy, the new database shouldnot interface external applications (pop/imap, smtp, shop-connectoretc...), if a replacement it should
Eric Caudal (from my mobile)
Bista Solutions US, Ray Carnes