Automated backups in Odoo
In this blog, we will see how to automatically take Automated backups in Odoo. Thanks to the backup module that integrates with Odoo.
First, download the module.Unzip this folder, you’ll now have a (module folder)
Now navigate to where your Odoo is located and paste the folder “module folder” in the “addons” folder.
Now that, a module is in your addons folder you should first install Pysftp. Pysftp is a module that offers the ability to handle all SFTP requests.
Now open a terminal and insert below line (command) and hit enter
sudo pip install pysftp -y
After this, you can update your module list by clicking on ‘Update Modules List’ under Settings.
Now to go Settings > Local Modules and search for ‘module folder’.
Install the module from here or open up the details and then click on install.
After that the module is installed you will see a new menu item named ‘Configure Backup’ under Settings > Configuration.
Click on this menu item and you will now see a tree view showing up. Now click on the ‘Create’ button to create a new backup.
After clicking on the ‘Create’ button you will see a new screen which is almost fully filled in by default.
After configuring everything you should get something along this lines:
Backup Directory /odoo/backups/
Auto. Remove Backups yes/no
Remove after x days 0
Write to external server with sftp – yes/no
Ip Address SFTP Server – 10.10.1.40
Username SFTP Server – netbkpadmin
Password User SFTP Server – ******
Path external server – /odoo/backups/crmerpbkp
Remove SFTP after x days – 15
Auto E-mail on backup fail – yes/no
E-mail to notify – [email protected]
Now check if you configured everything correctly by clicking on the button ‘Test SFTP Connection’
we’re almost done! The only thing left to do now is to activate the automated action. Go to Settings > Automation > Scheduled Actions.
will see an item in the list named ‘Backup scheduler’ that is grayed out, which means it has to be activated.
Open up the record and check the box ‘Active’ so the action will automatically run.
Now save this and from now on all your backups will be taken automatically as you’ve configured them!
Read More about Odoo