1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Save Jelastic Cloud to Swiss Backup (Swift)
This guide details how to save data from your folders and nodes Jelastic Cloud via protocol OpenStack Swifton Swiss Backup the backup solution in an independent Swiss cloud.
An extension is planned for Virtuozzo (Jelastic Cloud). Read more on the extension (add-on) on Github.
Prerequisites
- Use Jelastic Cloud (at least one Jelastic environment must be active with the extension installed to make your backups visible).
- Possession of space Swiss Backup Infomaniak with an available device quota (minimum 1) for a Cloud backup.
- Add 1 device Type Cloud to get the parameters OpenStack Swift.
⚠ Swiss Backup is compatible with any Openstack Swift, S3 Compatible or SFTP-supporting application. For additional assistance contact a partner — discover also the role of the host.
Configure Swiss Backup extension on Jelastic Cloud
To add the useful extension to Swiss Backup on Jelastic Cloud:
- Log in to Jelastic Cloud dashboard from your server.
- See you on Marketplace.
- Look for and install the extension Backup / Restoration.
Two types of backup are then possible and detailed below:
- Save specific folders.
- Create a snapshot of a knot Integer.
Save specific folders
For the backup of specific directories:
- Inform him username and password according to on information specific to your device.
- Check Backup your data.
- Check Backup specific folders
- Inform the absolute path of folders to be saved in the field Folders to backup ; it is possible to specify several folders by separating each path by a comma, e.g.:
/root/admin/, /home/user1/, /jelastic/containers/
(in this example, 3 folders were specified)...
Then we have to define the frequency backups (read below).
Save an Integer Node
For the backup of an integer node:
- Inform your Swift device's username and password on Swiss Backup.
- Check Backup your data.
- Check Backup all files to save the entire file system of a node; some files are automatically excluded:
- folders
/dev
,/proc
,/sys
,/run
- file systems not mounted as part of the root partition, including virtual file systems
- folders
Then we have to define the frequency backups.
Set frequency and retention policy for backups
Frequency of backups
2 options are available to perform the backup:
- daily (at 8 p.m. UTC)
- every hour (at the beginning of the hour, e.g. at 1 p.m., 2 p.m., etc.)
Conservation policy
You can set the shelf life of your backups in years, months, days and hours. To keep your backups indefinitely, simply set the settings to 0.
If e.g. you perform backups every hour and you set a retention policy at 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 (=10322 backups). Note that the deletion of backups is done every Sunday at 10:30 p.m. (UTC).
Attention : do not set all settings to 0, as permanent backups can result in backup failures.
Recommended limits:
- Year: 1
- Month: 12
- Days: 99
For backup time (each hour), it is recommended a maximum retention of one month. Beyond this value, some backups may fail.
Restore backups
Restore data from a node
- Log in to Jelastic dashboard from your server.
- See you on Marketplace.
- Look for and install the extension Swiss Backup.
- Inform your Swift device's username and password on Swiss Backup.
- Check Restore your data.
- Select the node that contains the backup to restore:
- Select the backup to restore and the restore folder.
- Click on the button Restore:
Restore snapshot-specific folders (CLI)
Each backup corresponds to a unique ID. You can include and exclude files from your snapshots when restoring. To see your snapshots:
. /home/.config/swissbackup/openrc.sh
restic snapshots
- Use
--exclude
and--include
to restrict restoration to a subset of files in the snapshot. P.ex. to restore a single file:restore 79766175 --target /tmp/restore-work --include /work/foo
There are variants insensitive to the cassation of --exclude
and --include
called --iexclude
and --iinclude
These options behave in the same way but ignore the breakage of paths.
Change the configuration of the backup
To this end:
- Log in to Jelastic dashboard from your server.
- Go into the Marketplace.
- Look for and install the extension Swiss Backup.
- Edit the configuration as desired.
Manually modify backup planning (CLI)
The backup calendar is set by a cronjob and backups are performed using the restic tool.
To change the planning of your backups:
As a root user, execute the command crontab -l
to display 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:
Edit the schedule using the command crontab -e
.
You can change the line composed of the script retention-all.sh
or retention.sh
, these scripts correspond to the launch of your backups. Be careful: crons have been designed not to cause problems between backups and multiple deletions. Attention to the time required for backups and deletions
- Learn more about cronjobs: crontab.guru
- Learn more about restic: restic.net
Manually Delete Backups (CLI)
To this end:
- Source the configuration file:
. /home/.config/swissbackup/openrc.sh
- Display the available backups:
restic snapshots
- Remove the desired backup:
restic forget IdBackup --prune
- Remove all backups from a file except one:
restic forget --tag folders --keep-last 1 --prune
Delete backup planning
This button allows you to delete the planning of your backup:
Uninstall the Swiss Backup extension
It is necessary to delete the backup planning (see above) before you can remove the Swiss Backup extension: