Backup & Restore

Modified on Thu, 1 Aug at 10:19 AM

Available in version 3.0.0+


Introduction


Labforward provides an out-of-the-box backup and restore solution for your Kubernetes cluster. The solution is built using Velero. Check more details here


This solution covers all the data and configurations inside the cluster, such as business data, release history, configuration values in the admin console, docker images, etc.


Host machine files are not backed up, such as files in the filesystem, operational system packages, environment variables, DNS external to Kubernetes, etc.


Restoring the backup into a different machine/VM is possible if the target host already has a Kubernetes cluster meeting Labforward’s minimum requirements.


Velero provides an incremental and deduplicated backup. It stores all the data using small blocks. All backups after the first one will keep only the new data compared with the previous backup. This means having multiple backups will use similar disk space as a single one, and the backup process is speedy, usually taking less than one minute.



Recommendations


Labforward’s backup provides good security, but as it does not cover some machine configurations, it is recommended to back up your whole VM in addition to the Labforward’s option.


The recommendations for an effective backup process are:

  • Enable automated backups;
  • Store the backups outside the cluster machine;
  • Create at least one backup every 6 hours;
  • Keep the backups for at least 4 weeks;
  • Trigger a new backup before deploying a new version.


There are suggestions, please adapt them to match your business requirements.


Backup Configurations


In the admin console, click on Snapshot Settings:



Configure it as your requirements. It is recommended to always use Full snapshots.


Settings Configurations

Some settings require further and specific configurations besides the UI options presented above.


NFS & Host Path: This POD runs in a process with the user & group 1001:1001 - and requires read, write, and execute permissions to the host path or NFS server directory. Feel free to use your favourite mechanism to give the expected permissions in the backup folder. 

Assuming the backup folder is /mnt/backup, an example is:


Change the ownership of the directory to user 1001:

sudo chown 1001 /mnt/backup

Make sure it has Read, Write, and Execute permissions:

sudo chmod 700 /mnt/backup



After adjusting the permissions, click "Update storage settings" in the snapshot configuration screen.  Currently, changing the POD's user and group is impossible.




Restore Process


In the admin console, go to Snapshots → Full Snapshots (instance). Click on the “Restore from this backup” button in the snapshot you want to restore:



Select Full restore, copy the command, and execute it in the Kubernetes host.


The restore process will shutdown all the applications and restart them with the restored data.


After the application status changes to "Ready”, you can use the applications normally. No further actions are required.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article