You'll find all the information about "Backups" for the On-Premises version in this article.
Create a backup
In your .env file, you’ll find the parameter BACKUP_CRON. Using the cron pattern, you can set when the automatic backup should be performed. By default, the backup is launched daily at 03:30 a.m. (server time).
Create a manual backup
You can access our Backup Service via a REST API using port 8083. It’s recommended to use tools such as Postman for this to manage the requests more easily. Below you’ll find the requests with CURL, which you can execute directly on the Haiilo host.
curl -u '<COYO_MANAGEMENT_USER>':'<COYO_MANAGEMENT_PASSWORD>' \
-X "PUT" https://<COYO_BACKEND_URL>:8083/api/backups
Backup Status
curl -u '<COYO_MANAGEMENT_USER>':'<COYO_MANAGEMENT_PASSWORD>' \
-x "GET" https://<COYO_BACKEND_URL>:8083/api/backups
You can also see the last execution date here (<BACKUP_CREATION_DATETIME>)
Restore from any backup
./stop.sh
docker-compose -f docker-compose.yml up -d \
--no-deps --remove-orphans \
coyo-db \
coyo-mongo \
coyo-backup \
coyo-lb \
coyo-s3
curl -u '<COYO_MANAGEMENT_USER>':'<COYO_MANAGEMENT_PASSWORD>' \
-X "PUT" https://<COYO_BACKEND_URL>:8083/api/backups/restore?ref=<BACKUP_CREATION_DATETIME>
The format of <BACKUP_CREATION_DATETIME> must be as follows \"YYYY-MM-DDTHH:MM:SS\" (e.g. \"2019-02-18T08:35:29\")\n
root@coyo-host:/home/coyo cd coyo-data/backup/database/
root@coyo-host:/home/coyo/coyo-data/backup/database ll
total 424
drwxr-xr-x 105 root root 4096 Oct 26 12:42 ./
drwxr-xr-x 5 root root 4096 Jul 6 03:30 ../
drwxr-xr-x 2 root root 4096 Jul 6 03:30 20180706_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 7 03:30 20180707_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 8 03:30 20180708_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 9 03:30 20180709_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 11 03:30 20180711_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 12 03:30 20180712_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 13 03:30 20180713_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 14 03:30 20180714_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 15 03:30 20180715_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 16 03:30 20180716_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 17 03:30 20180717_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 18 03:30 20180718_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 19 03:30 20180719_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 20 03:30 20180720_033000_coyo/
drwxr-xr-x 2 root root 4096 Jul 21 03:30 20180721_033000_coyo/
Note:
If you need to revert to an earlier Haiilo version in the course of an update, for example because there was a problem with the update, please note that the container versions must be used at the level of the previous Haiilo version.
The restore time depends on the amount of data. As an example: Restoring the backup (database + file store) of around 80GB takes approx. one hour. In addition, all of the indexes need to be updated following a backup restore.
Backup log
curl -u '<COYO_MANAGEMENT_USER>':'<COYO_MANAGEMENT_PASSWORD>' \
-X POST https://<COYO_BACKEND_URL>/manage/backend/index/refresh \
-H 'Content-Type: application/json' \
-d '{}'
curl -u '<COYO_MANAGEMENT_USER>':'<COYO_MANAGEMENT_PASSWORD>' \
-X GET https://<COYO_BACKEND_URL>/manage/backend/index/status
Deactivate a backup
While it's technically possible to switch off the backup, we advise against completely deactivating the backup as if your server or the server of your hosting provider suffers a hardware failure, there's no way to restore your current data.
To deactivate a backup, you can simply comment on the Haiilo backup container from the start script.
Delete old backups
However, please don’t delete anything in the directory coyo-data/backup/filestore!