Backups!
flarum_management
now supports backing and restoral of your site.
I have mostly tested this throughly -
... on a Ubuntu 16.04 vanilla install but please backup everything before trusting it fully (oh the irony)
And if it happens to go haywire, create a issue or report it here ?
Usage:
# Backup mysite.domain.tld
./flarum_management -b mysite.domain.tld
# Restore mysite.domain.tld
./flarum_management -a mysite.domain.tld
But this isn't just exporting to a tarball ?
The backups are incremental. This means that if you keep running the backup, you only use up a small bit of extra space. Did I mention you can run the backup repeatedly and it will create a new backup each time?
The backups are site specific and dated. If you run more then once in a day, it adds up from 1 (date_n)
$ for i in *; do du -hs $i; done
44M 2017-04-07
44M 2017-04-07_1
44M 2017-04-07_10
44M 2017-04-07_11
44M 2017-04-07_12
44M 2017-04-07_13
44M 2017-04-07_14
44M 2017-04-07_2
44M 2017-04-07_3
44M 2017-04-07_4
44M 2017-04-07_5
44M 2017-04-07_6
44M 2017-04-07_7
44M 2017-04-07_8
44M 2017-04-07_9
44M source
$ du -hs ./
128M ./
Restoral is automatic. It will restore from your most recent backup. If you want a backup prior to that, you must either do it manually or touch
another directory (eg touch 2017-04-07_14
) and then run the restore.
Backups older then 14 days are deleted.