Daily / Nightly Backup solution



Again, thanks for the great work on InvoicePlane. I am on version 1.5.4

I would like to suggest a feature that is probably important for all of us : daily or nightly backup solution just like BackWPup for Wordpress that backups to an FTP or locally to a folder automatically (scheduled).

Yesterday when a transaction got completed using Paypal Express as the gateway, the client get redirected to a new version of the page with “Paid” in green… all good… but when I got back in the admin side, all the clients, invoices disappeared (paid, unpaid… all of them). Really scary… I have no idea what causes the issue…logs tell nothing, but all settings were still there. So I guest that’s a bug, but I don’t know how to track it.

Anyways, I was able to recover because I have created a system that can probably help other users here and I think I should share this as myself I use a website hosted with CPANEL for the production so users gets their “guest url” links to pay online.

The idea was to integrate the table from InvoicePlane into a Wordpress Database. You just do export your MySQL DB in InvoicePlane and import it into Wordpress and use the free plugin BackWPup and in the job make sure to select all the tables (starting with IP). Just select them all. That’s not the perfect world because in case of desaster recovery, you have to import your Wordpress site as well.

Anyways here are the steps for automated backup using BackWPup

1- Install InvoicePlane to any new database (follow the guide)
2- Make sure you have a Wordpress installation and it’s DB information
3- Export the InvoicePlane DB (use phpmyadmin) and use basic setting (it will export a InvoicePlane.sql)
4- Still in phpmyadmin, position yourself to the Wordpress DB, go to Import and select InvoicePlane.sql file
5- Edit the file ipconfig.php and changethe information of the Wordpress Database
6- You should now have access back to your installation, now go to your Wordpress admin login
7- Search for and install the plugin BackWPup
8- Create a new job and make sure to select all folders and all tables in the DB (you should see the IP_tables) listed (just select them all). Schedule something for nightly.
9- From there I suggest to choose a destination that is outside of where the server is hosted, like an external FTP or you can even use Dropbox as a solution (you can choose multiple).

That’s it. You now have a fully backup and easy to recover solution in case of a disaster. You can create a second job to backup mid-day if you want.

** You can extract the DB only from the created file if you want to import just the DB and not the entire files. Be creative at this point. If you know MySQL a bit too, you can pick and choose what you want to replace.

But will be great to see a better solution.


<?php echo $code_example; ?>


It would be great of course if there was a built-in feature to do this job, but until then how about some more simple alternatives?

  • Web hosts usually have a backup/restore feature you could use. Most hosts have daily backups.
  • If it’s a VPS, a cron job to auto export IP DataBase at certain times per day
  • Email the database to yourself http://www.theblog.ca/mysql-email-backup


Or another solution we use in-house for our full disaster recovery is a small program called MySQLBackup https://mysqlbackupftp.com/ (free for basic requirements but paid options available). It can take a backup of your DB and send it via local network share, FTP, dropbox, google drive, AmazonS3, Azure etc.

We use IP as a business critical piece of software for our company - so backups are essential. This provides us with full disaster recovery as the DB is backup up every few hours to an offsite NAS box, we keep 12 months worth of backups on a rotating cycle.

The hard coded files in reality never change, except if you use custom templates, upgrade, edit your code manually or use the ‘Attach File’ feature on invoices/quotes so there is no real need to back these up regularly I tend to only back ours files up as I make changes to the code or change the PDF templates (we do attached files to invoices but these are backup up by our in-house file server so there is no need to back them up again within IP).

Hope this helps someone :grinning:


Don’t know if this helps…
But I had set up a local installation of InvoicePlane on a Mac with MAMP. There you have all files in one Folder which I backup completely to a FTP-Host.
For this scheduled, versioned and encrypted backup I use the free opensource “Duplicati”…
Works well :sunglasses:

You can use Duplicati also to backup from an external host to another… all combinations of local/external should work