Full disk backup
Since most Zylon installations run in a single node, it’s perfectly valid to do a traditional full disk backup with a tool like Clonezilla or similar. Store the image in a cold storage and in case of recovery simply replace the disk contents. Zylon should went back to the moment in the time the snapshot was taken. Note that this is only possible if Zylon is running in a single kubernetes node; multi node setups MUST use Velero as a backup strategy.Data backup using the zylon-cli
Backup command:
sudo zylon-cli backup [--keep-last N]
Will take a snapshot of Zylon data and save it it to the local machine.
Restore command:
sudo zylon-cli restore [--backup-file path-to-backup]
Will restore Zylon state to the moment in time the snapshot was taken. By default, the latest backup will be used, but a given snapshot can be specified too.
This basic backups will snapshot Zylon state and save the contents as a .tar.gz to the /var/backups/zylon
folder with the date of the backup as file name.
By default, only the last 10 backups are preserved.
During the backup process, Zylon will be offline. Depending on the amount of documents you have uploaded this process might take several minutes.
Putting backups on schedule
You can add this backups on a schedule automatically, runsudo crontab -e
to open the cron editor and add the backup like
For example, this backup will be performed every Saturday at 4am
Velero
Velero is the standard way to backup kubernetes clusters. It allows automation and only backs up the required cluster and application information.Note that in case of disk failure a Velero backup won’t restore the cluster, Nvidia drivers, and other tools required to run Zylon. To recover from that scenario perform a regular setup of Zylon followed by the backup restoration process.To enable Velero backups you must:
1. Install Velero CLI
velero
binary should be available in your path.
2. Provide a valid object storage solution.
This is the storage where the backups will be stored and ideally should be a completely separate machine. A list of common providers are:- AWS s3
- Google Cloud Storage
- Azure Blob storage
- A self hosted minio server
- Full list of providers here: https://velero.io/docs/v1.15/supported-providers/
setup instructions
for your provider of choice at the table https://velero.io/docs/v1.15/supported-providers/.
You might need to follow several steps like creating a AWS user in case of s3, configuring some permissions and so on. If you need guidance during the process contact the Zylon team.
3. Install Velero in the Zylon kubernetes cluster
Velero CLI will take care of most of the work to enable backups inside the cluster. However, in order to properly backup Zylon using Velero, several flags MUST be passed during the installation, in particular these flags are mandatory:/etc/zylon/velero.txt
with the content: