[ad_1]
Performing Database Operations using Odoo CLI makes operations easier and helps you manage and maintain the database efficiently and effectively.
This article will tell you the various commands and functions that you can perform database operations using Odoo CLI.
However, if you don’t have basic knowledge of Odoo CLI, read a beginner guide to Odoo CLI.
Prerequisite: We are assuming that you have basic knowledge of ODOO CLI
Odoo command-line also allows you to perform DB operations like, db backup, restore, duplicate, drop.
Odoo Company ? Read More
./odoo-bin db -c config.conf operation
Here:-
- db is the sub-command used to perform the database operation
- -c is the path of the config file, which helps to run the odoo instance
Before moving ahead, check out our Odoo development services & an extensive range of quality Odoo Apps.
Create Backup Using CLI:
./odoo-bin db -c config.conf dump database_name backup.zip
This will create a backup file ‘backup.zip’ in the current directory. This zip will include SQL and filestore.
Restore database using CLI:
./odoo-bin db -c config.conf load new_db backup.zip
This will create a new database ‘new_db’ using the file ‘backup.zip’
Duplicate database using CLI
./odoo-bin db -c config.conf duplicate db_name new_dbname
This will create a duplicate database ‘db_name’ which will be the copy of database ‘new_dbname’
Rename database using CLI
./odoo-bin db -c /etc/odoo.conf rename db_name new_name
This will rename the database ‘db_name’ to ‘new_name’
Besides, read our blog on how to create and restore a database in Odoo to understand the complete process.
Drop database using CLI
./odoo-bin db -c /etc/odoo.conf drop db_name
This will drop the database ‘db_name’
Hope you enjoyed this post, I’d be very grateful if you’d write your opinions, comments and suggestions to keep the page updated and interesting.
NEED HELP?
Hope you find the guide helpful! Please feel free to share your feedback in the comments below.
If you still have any issues/queries regarding the same, please raise a ticket at the UV Desk.
For any doubt, contact us at our support mail.
[ad_2]
Source link