Skip to content

convertigo/c8oprj-lib-fullsync-backup

Repository files navigation

lib_FullSyncImportExport

This project performs backup or restore of Convertigo Fullsync Databases.
It is aimed for Cloud or Docker Convertigo Server.
It is based on Daniele Bailo's couchdb-dump bash script.
The project must be deployed on the target Convertigo Server.

For more technical informations : documentation

Installation

  1. In your Convertigo Studio click on to import a project in the treeview

  2. In the import wizard

    paste the text below into the Project remote URL field:

    UsageClick the copy button at the end of the line
    To contribute
    lib_FullSyncImportExport=https://github.com/convertigo/c8oprj-lib-fullsync-backup.git:branch=8.0.0.0
    
    To simply use
    lib_FullSyncImportExport=https://github.com/convertigo/c8oprj-lib-fullsync-backup/archive/8.0.0.0.zip
    
  3. Click the Finish button. This will automatically import the lib_FullSyncImportExport project

Secret Symbol

The project expects a secret project symbol named ${lib_FullSyncImportExport.secretkey.secret} on the target Convertigo server. Each sequence also exposes a request variable named secret. At runtime, the received variable is compared with the symbol value. If the value is missing or invalid, the sequence returns a 403 Forbidden error structure. Internal sequence calls already propagate the secret variable automatically.

Sequences

FS_backup

Creates a backup file for one FullSync database and can optionally compress it as .gz.

variables

namecomment
cdb_gzSet to 1 or true to create a compressed .gz backup file.
cdb_nameName of the FullSync database to back up.
reset_db_folderSet to 1 or true to clear the backup folder before creating the new backup.
secretSecret value that must match the lib_FullSyncImportExport.secretkey.secret project symbol.

FS_backup_all

Backs up all available FullSync databases into the server backup folder.

variables

namecomment
cdb_gzSet to 1 or true to create compressed .gz backup files.
secretSecret value that must match the lib_FullSyncImportExport.secretkey.secret project symbol.

FS_get_db_folder

Lists the backup files currently available in the backup folder.

variables

namecomment
secretSecret value that must match the lib_FullSyncImportExport.secretkey.secret project symbol.

FS_reset_db_folder

Clears and recreates the backup folder before a new backup run.

variables

namecomment
reset_db_folderSet to 1 or true to delete and recreate the backup folder.
secretSecret value that must match the lib_FullSyncImportExport.secretkey.secret project symbol.

FS_restore

Restores one FullSync database from a JSON or GZip backup file.

variables

namecomment
cdb_fileUploaded backup file to restore, in JSON or GZip format.
cdb_nameName of the FullSync database to restore.
secretSecret value that must match the lib_FullSyncImportExport.secretkey.secret project symbol.

getProperties

Loads the FullSync/CouchDB server settings from Convertigo server properties and stores them in HTTP session.

variables

namecomment
secretSecret value that must match the lib_FullSyncImportExport.secretkey.secret project symbol.

ungzip

Detects whether an input file is already JSON or GZip and decompresses it when required.

variables

namecomment
secretSecret value that must match the lib_FullSyncImportExport.secretkey.secret project symbol.
sourceFileSource backup file path, in JSON or GZip format.
targetFileTarget JSON file path used when the source file must be decompressed.

About

Utility library that assists Convertigo developers in backing up and restoring FullSync databases for safer data management.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors