Closed NasKar2 closed 4 years ago
I think this is a very complicated solution for something that is as simple as:
Basically what I covered here: https://github.com/Ornias1993/jailman/tree/jails/nextcloud
Considering @danb35 just merged my PR: All data required to be backed up is now seperated from the main nextcloud jail and the readme includes the instruction to create seperate datasets for them.
They can be easily and more reliably be backed up using freenas nextcloud snapshots imho. Instead of 500+ rows of code.
@danb35 Considering the changes after this PR was submitted and the fact it isn't even mergeable anymore, I suggest closing this.
No need as reinstall with old data works great
Currently there is no automated way to backup and restore nextcloud to a new install if something goes wrong with your jail. Included is a fix that the nextcloud/config directory is not created if it doesn't exist.
Backup and Restore
NextcloudBR.sh and NextcloudBR-config are automatically copied to the jails /usr directory. At the end of the restore the script will reset the admin password and ask for a new one. You can automate backup up by setting the cron variable to "yes" in the NextcloudBR-config. It will then automatically backup and not give you the option to restore. The version of nextcloud must be the same as the version of the backup or it will break the install.
run the backup and restore script from the iocage jail for nextcloud
from outside the jail
from inside the jail
To run the backup automatically add to a crontab -e after setting the cron variable to "yes" in NextcloudBR-config