Automatic Backup Plugin

Post Reply
User avatar
StephanStanisic
Posts: 37
Joined: Fri Jul 05, 2019 8:51 pm

Automatic Backup Plugin

Post by StephanStanisic »

Hi,

Since I've had some bad luck with an installation of mine, I had lost a WonderCMS websites' database. Now the real solution to this is to take regular backups, but I didn't have a single one.

Backups should be automated, and I am really temped to write a plugin for this. My question, what would you like to see in this backup plugin?

Couple of points that I'm thinking about:
  • Using the default WonderCMS backup procedure for a full site backup.
  • Option to separately backup the database.js, and various .json database files (e.g. more frequent than a full backup).
  • Writing backups to local disk
  • Writing backups to external storage providers
    • FTP based? Maybe WebDAV based for Nextcloud support?
    • Dropbox, or other personal storage provider?
Please leave any idea's and suggestions!
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Automatic Backup Plugin

Post by wiz »

Hi Steph.
- Using the default WonderCMS backup procedure for a full site backup.
Seems like definitely the right way to go. The issue here could be if the user doesn't visit their website in a month, and if a backup is done daily, the backup system itself with always back up all other backups. A solution here would be to ignore other backups (the default backup mechanism doesn't ignore anything currently).
- Option to separately backup the database.js, and various .json database files (e.g. more frequent than a full backup).
This would also solve some of the issues (like huge backups).

The last two points you wrote don't seem as important for the start of the plugin, what do you think?

I wouldn't leave the user with too many options to avoid confusion, maybe just a "often" parameter which would decide when a backup would be performed (daily, weekly?), but for this to work, a start date has to be set (possibly when the plugin is installed to save the "start" date and go on from there).

This definitely sounds like an awesome plugin!
User avatar
mjxl
Posts: 44
Joined: Thu Jan 30, 2020 4:57 am

Re: Automatic Backup Plugin

Post by mjxl »

Maybe on each backup write the size of 'database.js' somewhere, then when another backup is called it would check if the size hasn't changed, thus NOT triggering another backup?
User avatar
StephanStanisic
Posts: 37
Joined: Fri Jul 05, 2019 8:51 pm

Re: Automatic Backup Plugin

Post by StephanStanisic »

Hmm, not storing duplicate entries seems like a good idea. I'd go with a hash to check that instead of length, since length can stay the same across edits. Good idea!
User avatar
mjxl
Posts: 44
Joined: Thu Jan 30, 2020 4:57 am

Re: Automatic Backup Plugin

Post by mjxl »

StephanStanisic wrote: Mon Aug 17, 2020 7:24 am Hmm, not storing duplicate entries seems like a good idea. I'd go with a hash to check that instead of length, since length can stay the same across edits. Good idea!
Yeah I was thinking hash too, didn't want to look like a fool if hashing wasn't the prefered method here, hence i posted a general 'size' :D
Post Reply