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.
Preamble
- In order to save data, an extension for Virtuozzo (Jelastic Cloud) is available in the node addons.
- Read more on the extension (add-on) on Github.
- Do not look for the extension in the Marketplace, it is not there:
Configure Swiss Backup extension on Jelastic Cloud
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.
To add the useful extension to Swiss Backup on Jelastic Cloud:
- Log in to Jelastic Cloud dashboard from your server.
- See you on the add-on section of the node:
- 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
Two 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.)
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.
For example, if you perform backups every hour and 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 removal of backups is done every Sunday at 10:30 pm (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.
- Once the extension and password username of your Swift device has been added to 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.
- Once the extension and password username of your Swift device has been added to Swiss Backup, change the configuration as desired.
The backup calendar is set by a cronjob and backups are performed using the restic tool.
To manually change backup planning (CLI), as 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. Pay 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:
⚠ 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.