1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Backup Jelastic Cloud to Swiss Backup (Swift)
This guide details how to back up the data from your folders and nodes on Jelastic Cloud using the OpenStack Swift protocol on Swiss Backup, an independent Swiss cloud backup solution.
Introduction
- To back up the data, an extension for Virtuozzo (Jelastic Cloud) is available in the node add-ons.
- Learn more about the extension (add-on) on Github.
- Do not look for the extension in the Marketplace, it is not there:
Configure the Swiss Backup extension on Jelastic Cloud
Prerequisites
- Use Jelastic Cloud (at least one Jelastic environment must be active with the extension installed for your backups to be visible).
- Have a Swiss Backup Infomaniak space with at least one available device quota for a Cloud backup.
- Add 1 device of type Cloud to obtain the OpenStack Swift parameters.
To add the useful extension to Swiss Backup on Jelastic Cloud:
- Log in to your server's Jelastic Cloud Dashboard.
- Go to the node addons section:
- Search for and install the Backup / Restoration extension:
Two types of backup are then possible and detailed below:
- Back up specific folders.
- Create a snapshot of an entire node.
Back up specific folders
For backing up specific folders:
- Enter the username and password according to the information specific to your device.
- Check Backup your data.
- Check Backup specific folders
- Enter the absolute path of the folders to back up in the Folders to backup field; it is possible to specify multiple folders by separating each path with a comma, for example:
/root/admin/, /home/user1/, /jelastic/containers/
(in this example, 3 folders have been specified)…‍
Then you need to define the frequency of the backups (read more below).
Backup 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:
- The folders
/dev
,/proc
,/sys
,/run
- File systems not mounted as part of the root partition, including virtual file systems
- The folders
Then you need to set the frequency of the backups.
Define backup frequency and retention policy
Two options are available to perform the backup:
- daily (at 8 PM UTC)
- every hour (at the start of the hour, for example at 1 PM, 2 PM, etc.)
You can set the retention period for 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 every hour and set a retention policy to 1 year, 2 months, 4 days, 2 hours, this means that each backup will be available for a period of 1 year, 2 months, 4 days, 2 hours (=10,322 backups). Note that backups are deleted every Sunday at 10:30 PM (UTC).
Warning: do not set all parameters to 0, as permanent backups can cause backup failures.
Recommended limits:
- Year: 1
- Months: 12
- Days: 99
For an **hourly** (every hour) backup, a maximum retention of one month is recommended. Beyond this value, some backups may fail.
Restore backups
Restore data from a node
- Log in to your server's Jelastic Dashboard.
- Once the extension is added and the username and password of your Swift device on Swiss Backup are entered, check Restore your data.
- Select the node that contains the backup to restore:
- Select the backup to restore and the restoration folder.
- Click on the Restore button:
Restore specific folders from a snapshot (CLI)
Each backup corresponds to a unique ID. You can include and exclude folders from your snapshots during a restoration. To view your snapshots:
. /home/.config/swissbackup/openrc.sh
restic snapshots
- Use
--exclude
and--include
to restrict the 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 in the same way but ignore the case of the paths.
Modify the backup configuration
To do this:
- Log in to your server's Jelastic Dashboard.
- Once the extension is added and the username and password of your Swift device on Swiss Backup are entered, modify the configuration as desired.
The backup schedule is defined by a cron job and backups are performed using the restic tool.
To manually modify the backup scheduling (CLI), as a 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 retention-all.sh
or retention.sh
, these scripts correspond to the launch of your backups. Warning: the crons have been designed not to cause problems between backups and multiple deletions. Be mindful of the time required for backups and deletions…
- Learn more about cron jobs: crontab.guru
- Learn more about restic: restic.net
Manually delete backups (CLI)
For this:
- 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 the backup schedule
This button allows you to delete your backup schedule:
Uninstall the Swiss Backup extension
It is necessary to delete the backup schedule (see above) before you can delete the Swiss Backup extension:
⚠️ The various services offered by Infomaniak are all compatible with the corresponding standard protocols (notably IMAP/SMTP for email, WebDAV for sharing, S3/Swift for storage, etc.). Therefore, if you encounter a problem with third-party software, contact its publisher directly or a Partner and consult the support policy as well as article 11.9 of the Infomaniak Terms and Conditions.