I am trying to take a backup from Odoo enterprise 14 through query.
When I try to export the dump file I get this message
Can anyone guide me, how to export all the tables with data ?
You can simply backup odoo database with this command :
pg_dump –format=c your_database_name > your_backup_name.dump
This will save your entire database to .dump format.
Related
I'm new with Odoo and I want to see just the database tables (the data is not really important) from database IDE e.g. DataGrip. There are 2 options to download the database from Odoo:
zip (includes filestore)
pg_dump custom format (without filestore)
I create a temporary Postgres database to import the file. It seem like the dump.sql from zip (includes filestore) work when I imported, but I get some errors like:
The JDBC driver currently does not support COPY operations.
multiple primary keys for table "stock_rules_report" are not allowed
etc
Log summary:
Summary: 11748 of 11748 statements executed, 4886 failed in 16 s 642 ms (1525350 symbols in file)
Environment:
Odoo 12
Postgres 10 & 13
DataGrip
Take the custom format dump and restore it with the PostgreSQL client tool pg_restore:
pg_restore --schema-only -d targetdb -h dbhost -p 5432 -U postgres dumpfile
That will restore only the table definitions without the data.
Backup and Restore using url:port/web/database/manager
https://odoosolution.blogspot.com/2021/01/odoo-database-backup-restore.html
I want backup and restore a schema with pgadmin 4 and postgresql 10.5
but it doesn't work : no data is imported
During export, I try tar format and backup type file.
No message errors juste these lines when i restore:
pg_restore: connecting to database for restore
pg_restore: implied data-only restore
Do you have a idea
thanks a lot ?
Apparently, it works if I create a new database but it doesn't work in a same database.
A idea ?
I've been trying to migrate my old openerp server installation to a new VPS so I tried to migrate the database.
I need to do it via shell because of the size of the database and unstable connection.
What I've done is log in server1 and then
su postgres
pg_dump dbname > db.dump
then I transfered the file to the new server and restored it like this
createdb dbname
psql dbname < db.dump
the database itself was restored and I can browse through the tables if I want to but when I try to get in OpenERP the database is not available in the select box where the databases are. If I create new databases by using the openerp interface they appear correctly in the select box and I can connect.
I tried to create the db with UTF8 encoding and using template1 as well but nothing was different. I also tried to create the database via the interface, drop the tables and restore the backup but this gives errors after I log in like "product.product relation does not exist".
Any ideas what else I could try? Thanks in advance.
When restoring the database take care to restore it with the correct ownership.
You may want to take a look at this question
I've spend whole day trying to restore a 499MB .SQL magento database backup file into a new server. I have tried importing into another PC offline but im getting same error Unknown command '\9' and '\a', im trying to restore the .SQL file using the following command - mysql -u -p databasename < backup.sql
I have tried Bigdump script but no success. The database file is too large it won't even open up on my pc.
Is there any other way to restore a database backup file of this size into a new server ? Help would be greatly appreciated!
Update: Strange characters appearing on opening .SQL backup file.strange characters in .sql file
Thanks in advance
Make sure the character sets of the databases match up. eg: mysql --default-character-set=utf8 database < databasedump.sql
Can I import .dmp file created from oracle (8i) into MySql database? I tried importing the dump file directly using mysql workbench, but showing some error which I am mentioning below.
Creating schema newschema
10:49:15 Restoring G:\dmp\pass.dmp
Running: mysql.exe --defaults-extra-file="c:\users\acer\appdata\local\temp\tmpliqb6y.cnf" --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=newschema < "G:\\dmp\\xyz.dmp"
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
How to solve this?
No, you probably can't.
An Oracle export is a proprietary, undocumented files format. It can, realistically, only be read by the Oracle import utility. There may be some third party tools that may have reverse engineered the file format, but I'm not aware of any that would import into MySQL.
If you import the data into a local Oracle database, it becomes much easier to transfer it into a MySQL database. Any ETL tool can do so, you can write an application to move the data, you can connect from Oracle to MySQL to push the data, you can extract the DDL and DML from the Oracle database, etc.