1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Backing up Jelastic Cloud on Swiss Backup (Swift)
This guide details how to back up data from your folders and nodes on Jelastic Cloud using the OpenStack Swift protocol on Swiss Backup, the backup solution in an independent Swiss cloud.
For this purpose, an extension is provided for Virtuozzo (Jelastic Cloud). Learn more about the extension (add-on) on Github.
Prerequisites
- Use Jelastic Cloud (at least one Jelastic environment must be active with the extension installed for your backups to be visible)
- Own an Infomaniak Swiss Backup space with an available device quota (minimum 1) for Cloud backup
- Add 1 device of type Cloud to obtain OpenStack Swift settings
⚠️ Swiss Backup is compatible with any application supporting Openstack Swift, S3 Compatible, or SFTP. For additional assistance, contact a partner — also read the hosting provider's role.
Configuring the Swiss Backup extension on Jelastic Cloud
To add the useful extension to Swiss Backup on Jelastic Cloud:
- Log in to your server's Jelastic Cloud Dashboard
- Go to Marketplace
- Search for and install the Backup / Restoration extension
Two types of backups are possible and detailed below:
- Backup specific folders
- Create a snapshot of an entire node
Backing Up Specific Folders
For backing up specific directories:
- Enter the username and password according to your device's specific information (read this guide - click here)
- Check Backup your data
- Check Backup specific folders
- Enter the absolute path of the folders to back up in the Folders to backup field; you can specify multiple folders by separating each path with a comma, e.g., /root/admin/, /home/user1/, /jelastic/containers/ (in this example, 3 folders have been specified)
Then, define the backup frequency (explained below).
Backing Up an Entire Node
For backing up an entire node:
- Enter the username and password of your Swift device on Swiss Backup
- Check Backup your data
- Check Backup all files to back up the entire file system of a node; some files are automatically excluded:
- /dev, /proc, /sys, /run folders
- Unmounted file systems as part of the root partition, including virtual file systems
Then, define the backup frequency (explained below).
Defining Backup Frequency and Retention Policy
Backup Frequency
Two options are available for performing the backup:
- daily (at 8 p.m. UTC)
- hourly (at the beginning of each hour, e.g., at 1 p.m., at 2 p.m., etc.)
Retention Policy
You can set the retention duration of your backups in years, months, days, and hours. To keep your backups indefinitely, simply set the parameters to 0.
For example, if you perform backups hourly and set a retention policy for 1 year, 2 months, 4 days, 2 hours, each backup will be available for a period of 1 year, 2 months, 4 days, 2 hours (=10322 backups). Note that backup deletions occur every Sunday at 10:30 p.m. (UTC).
Attention: Do not set all parameters to 0, as permanent backups can cause backup failures.
Recommended Limits:- Year: 1
- Month: 12
- Days: 99
For hourly backups, a maximum retention of one month is recommended. Beyond this value, some backups may fail.
Restoring Backups
Restoring Node Data
- Log in to your server's Jelastic Dashboard
- Go to Marketplace
- Search for and install the Swiss Backup extension
- Enter the username and password of your Swift device on Swiss Backup
- Check Restore your data
- Select the node containing the backup to restore
- Select the backup to restore and the restore folder
- Click the Restore button
Restoring Specific Folders from a Snapshot (CLI)
Each backup corresponds to a unique ID. You can include and exclude folders from your snapshots during a restore. To view your snapshots:
- . /home/.config/swissbackup/openrc.sh
- restic snapshots
- Use --exclude and --include to restrict restoration to a subset of files in the snapshot. For example, to restore a single file: restore 79766175 --target /tmp/restore-work --include /work/foo
There are case-insensitive variants of --exclude and --include called --iexclude and --iinclude. These options behave the same way but ignore case in paths.
Modifying Backup Configuration
- Log in to your server's Jelastic Dashboard
- Go to Marketplace
- Search for and install the Swiss Backup extension
- Modify the configuration as desired
Manually Modifying Backup Scheduling (CLI)
Backup scheduling is defined by a cronjob, and backups are performed using the restic tool.
To modify the scheduling of your backups:
As root user, run the command crontab -l to display the current schedules:- the line containing retention-all.sh corresponds to the backup task
- the line containing purge.sh corresponds to the backup retention task
Example:
Modify the schedule using the command crontab -e
You can modify the line composed of the script rentention-all.sh or retention.sh; these scripts correspond to launching your backups. Note: the crons have been designed not to cause problems between multiple backups and deletions. Please pay attention to the time required for backups and deletions.- Learn more about cronjobs: crontab.guru
- Learn more about restic: restic.net
Manually Deleting Backups (CLI)
- Source the configuration file:
. /home/.config/swissbackup/openrc.sh - Display available backups:
restic snapshots - Delete the desired backup:
restic forget IdBackup --prune - Delete all backups of a file except one:
restic forget --tag folders --keep-last 1 --prune
Delete Backup Schedule
This button allows you to delete your backup schedule:
Uninstalling the Swiss Backup Extension
It is necessary to remove the backup schedule (see above) before you can uninstall the Swiss Backup extension: