Skip to Content
Menu
This question has been flagged
2 Replies
3868 Views

I can't restore one of my db backup size is more than 1 gb. I can only restore low size backup zip file.(I am not able to extract or open that large zip file, when i am trying to open its shows error message. Error message = An error occurred while loading the archive.).

If any one know please respond. Thanks.

Avatar
Discard
Best Answer

Add client_max_body_size 4G; to your  nginx file in http part and restart the nginx.

Avatar
Discard
Best Answer

Odoo Interface may get a timeout in case of large files restore. So you can follow these methods

How to restore ODOO databases?

Restoring large databases using the ODOO conventional method doesn’t allow restoring backup file formats Plain SQL, or compressed gzip backup. If you got a dump of a large database and you are trying to restore using the same method will end with a timeout error.

I can recommend you restore the ODOO database using PSQL queries, which are reliable, fast and efficient. Here I can give you simple methods to restore the databases using PSQL.

Plain SQL Format

The plain text format is useful for very small databases with a minimal number of objects but other than that, it should be avoided.

psql -U username -d database -f backupfile.sql

or

psql database < backupfile.sql

Tar Format

Using this archive format allows reordering and/or exclusion of database objects at the time the database is restored. It is also possible to limit which data is reloaded at restore time. we use tar with gzip

pg_restore -d database backupfile.tar -U username

You can add the following parameters

  • -c create a new database before restore
  • -v verbose mode
  • - t particular table only

Compressed Format

This is the most flexible format in that it allows the reordering of loading data as well as to object definitions. This format is also compressed by default.

pg_restore -d database backupfile.sql.gz -U username

or

gunzip -c backupfile.sql.gz | psql -U username -d database


Reference: https://hilarak.medium.com/odoo-database-backup-automatically-restore-using-psql-7aaf5db89f17

Automated Backup Module To Handle Large Database:  https://apps.odoo.com/apps/modules/15.0/auto_backup_odoo/

Avatar
Discard
Related Posts Replies Views Activity
0
Jun 23
1854
4
Jul 24
13589
2
Jun 25
1619
0
May 25
14
9
Apr 25
64033