Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

[Public release] Automated backup module

By
Yenthe
on 3/19/15, 10:13 AM 1,695 views

Hi guys,

Is there any tool available that automatically takes backups from my Odoo databases?
I'd like to automate this and keep my back-ups both locally and external on an FTP server.

Thanks,
Yenthe 

5

Yenthe

--Yenthe--
6686
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 3/19/15, 10:42 AM

Since a while I've been search for a back-up tool but didn't find what I wanted so I decided to build my own module. I've started from the Odoo V6.0 module and then started expanding it.

Where can I find it?

You can download it from the Odoo app store or from Github.

What does this module support?

  • Automated backups on your own server.

  • Choose when and how often the backups should be taken.

  • Automatically creates the directories you specify (note: directly under / is not permitted, so this is the only exception. If the first level folder exists my module can create the rest - if the user you authenticate with has enough system rights.)

  • Automatically removes old backups when they are older than you've specified.

  • Connection support to any FTP server that has SSH enabled.

  • Automatically create the directories on the FTP. (note: directly under / is not permitted, so this is the only exception. If the first level folder exists my module can create the rest - if the user you authenticate with has enough system rights.)

  • Automated backups on the FTP server.

  • Automatically removes old backups when they are older than you've specified.

  • Option to keep external backups longer then local ones, or the other way around.

  • Automatically e-mail when there is a connection or writing failure to the FTP. (Provided you have e-mail servers configured and have this option checked)

  • Fully translated in English, Dutch, Chinese and German.

  • ...

How should I install this?

  1. Download the module.

  2. Place it under ../addons/

  3. Install pysftp. This lib is needed to have access to an external FTP server. Open an Ubuntu terminal and run the command sudo pip install pysftp to install the lib.

  4. Update your modules (Settings > Update Modules List)

  5. Search for the module ("Database Auto-Backup") and install it.

  6. Configure the details as you wish under Settings > Configure Backup. Be sure to test the FTP connection!

  7. Go to Settings > Automation > Scheduled Actions and open the record "Backup scheduler". Set it to active and specify how often you want the back-ups to be taken.

  8. Profit! :)

Alternatively you can read a full tutorial here: http://www.odoo.yenthevg.com/automated-backups-in-odoo/

@Yenthe,

Awesome work, thanks!

Luke Branch
on 3/20/15, 5:34 AM

@Luke, No problem! You're always free to give feedback or leave thoughts here about the module too :) Have you implemented it on yours?

Yenthe
on 3/20/15, 5:37 AM

Yenthe!! Its really awesome!!

Tidy Way
on 3/21/15, 12:40 AM

Thanks Tidy, great to hear that! :) Have you managed to get it working at your side? I'd love some feedback about this. & if you really like it, an upvote is always welcome if you feel it is justified!

Yenthe
on 3/22/15, 11:31 AM

@Yenthe,

I've just implemented this on a development instance, it looks like a lot of work has gone into this. This looks like it's going to be a valuable part of every Odoo instance I work on. Thanks!

I'll comment back here once i've had more time to work with the module.

Luke Branch
on 3/23/15, 10:01 PM

Great job Yenthe ! I have a personal hacky script for this sort of thing, but never tried to build a module for this. I will definitely test yours when I have more time.

PY
on 3/24/15, 5:54 AM

@Luke thanks, thats great to hear! Keep me updated about your experiences. :) @PY: Thanks! Time for you to switch from buggy to my module then, one thing less to worry about. Let me know how it goes.

Yenthe
on 3/24/15, 10:39 AM

You are the man :-)

Ermin Trevisan
on 4/21/15, 4:53 PM

Maybe you can add an option for backup the Odoo filestore?

Mario Gielissen | Openworx
on 4/30/15, 10:42 AM

@Mario the module creates a .dump which both contains an sql file to restore the db and folder with your filestore, so both are included! :) @Ermin: thanks!

Yenthe
on 5/2/15, 9:46 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 3/19/15, 10:13 AM
Seen: 1695 times
Last updated: 5/13/15, 8:55 PM