Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Jahia/paas_jelastic_backup

Repository files navigation

Jelastic paas backup/restore

Packages

backup.yml

Backups an environment. Works both for jahia (files + database) and jCustomer (elasticsearch index).

Parameters

Name Default Comment
backup_name Backup Name
aws_access_key AWS Access Key
aws_secret_key AWS Secret Key
env prod Enviroment mode (dev or prod)
timestamp The backup timestamp in format %Y-%m-%dT%H:%M:00
retention 15 How many auto-backups do you want to keep
backtype manual Is this a manual or auto backup

restore.yml

Restores a backup. Works both for jahia (files + database) and jCustomer (elasticsearch index).

Parameters

Name Default Comment
backup_name Backup Name
aws_access_key AWS Access Key
aws_secret_key AWS Secret Key
env prod Enviroment mode (dev or prod)
source_env Source environment appid (if still exists)
envrole_source [If source_env not defined] Enviroment source mode (dev or prod)
cloud_source [If source_env not defined] Enviroment source cloud provider
region_source [If source_env not defined] Enviroment source cloud provider region
uid_source [If source_env not defined] Environment owner's UID
timestamp The backup timestamp in format %Y-%m-%dT%H:%M:00
retention 15 How many auto-backups do you want to keep
backtype manual Is this a manual or auto backup
removeEnvlink 1 Remove (1) or keep (0) Env links

mixins

Contains code used by multiple packages to avoid duplication

listbackup.yml

DEPRECATED List backups for a given user.

Python scripts

backrest.py

Can execute multiple tasks like :

  • upload a backup
  • download a backup
  • add backup metadata
  • remove backup metadata
  • list backups DEPRECATED
  • rotate backups

Parameters

Name Comment
-a --action The operation you want to do (upload, download, list, addmeta, delmeta, rotate)
--bucketname The bucket name you want to use
--backupname The backup name
--displayname The environment display name (for metadata)
-f --file  The local file you want to upload or download
-k --keep How many auto backups you want to keep (in case of backup rotation)
-F --foreign If the backup is from another cloud/region/role ex: aws,eu-west-1,prod
-t --timestamp Backup timestamp in format %%Y-%%m-%%dT%%H:%%M:00
-m --mode The backup mode : manual or auto

elasticsearch.py

Used to backup jCustomer environments. Retrieves azure secrets if necessary and create folders if not existing

Parameters

Name Comment
--bucketname The bucket name you want to use
--backupname The backup name
-c --cloudprovider The backup cloudprovider
-o --operation backup or restore

revisionNode.py

Creates revisionNode file

Parameters

Name Comment
-n --number Decimal number to set in file
-f --file File path
-r --read Reads the file instead of writing it

JahiaCloud

Contains libs used to handle authentication and manipulate files on AWS S3 buckets and Azure Resource Groups