From c043c4825c735f9c1a578025b48c1e8293c5959f Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Thu, 18 Nov 2021 16:08:24 +0000 Subject: [PATCH] Added elkarbackup CT --- .gitignore | 4 +- CT-Build/Alpine.Jenkinsfile | 2 +- CT-Build/Alpine.yaml | 37 ++++++++++++ CT-Build/Debian.yaml | 33 +++++++++++ CT-Files/elkarbackupALP/Configs/crontab | 1 + .../Configs/elkarbackupconf.yaml | 27 +++++++++ CT-Files/elkarbackupALP/Configs/nginx.conf | 56 +++++++++++++++++++ CT-Files/elkarbackupALP/Configs/php.conf | 15 +++++ .../elkarbackupALP/Configs/phpTimezone.ini | 2 + CT-Files/elkarbackupALP/Configs/sudofile | 3 + .../MySQLBackup/MySQLBackup-RemoteTrigger.sh | 3 + .../Extras/MySQLBackup/MySQLBackup-Tool.sh | 25 +++++++++ .../Extras/MySQLBackup/ReadMe.md | 25 +++++++++ CT-Files/elkarbackupALP/Scripts/FirstRun.sh | 20 +++++++ CT-Files/elkarbackupALP/Scripts/Init.sh | 44 +++++++++++++++ .../Configs/elkarbackupconf.yaml | 27 +++++++++ CT-Files/elkarbackupDEB/Scripts/FirstRun.sh | 16 ++++++ CT-Files/elkarbackupDEB/Scripts/Init.sh | 7 +++ CT-Files/nextcloud/Configs/php.conf | 1 + CT-Files/nextcloud/Configs/phpTimezone.ini | 2 + CT-Files/nextcloud/Scripts/Init.sh | 1 + Readme.md | 22 +++++++- Scripts/GetExternalResources.sh | 8 ++- 23 files changed, 377 insertions(+), 4 deletions(-) create mode 100644 CT-Files/elkarbackupALP/Configs/crontab create mode 100644 CT-Files/elkarbackupALP/Configs/elkarbackupconf.yaml create mode 100644 CT-Files/elkarbackupALP/Configs/nginx.conf create mode 100644 CT-Files/elkarbackupALP/Configs/php.conf create mode 100644 CT-Files/elkarbackupALP/Configs/phpTimezone.ini create mode 100644 CT-Files/elkarbackupALP/Configs/sudofile create mode 100644 CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-RemoteTrigger.sh create mode 100644 CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-Tool.sh create mode 100644 CT-Files/elkarbackupALP/Extras/MySQLBackup/ReadMe.md create mode 100644 CT-Files/elkarbackupALP/Scripts/FirstRun.sh create mode 100644 CT-Files/elkarbackupALP/Scripts/Init.sh create mode 100644 CT-Files/elkarbackupDEB/Configs/elkarbackupconf.yaml create mode 100644 CT-Files/elkarbackupDEB/Scripts/FirstRun.sh create mode 100644 CT-Files/elkarbackupDEB/Scripts/Init.sh create mode 100644 CT-Files/nextcloud/Configs/phpTimezone.ini diff --git a/.gitignore b/.gitignore index e865b31..7061bb3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,6 @@ CT-Files/nextcloud/nextcloud.tar.bz2 CT-Files/aptcacherng/*_mirrors CT-Files/mailbackup/OfflineIMAP3-installed CT-Files/mailbackup/rainloop-installed -CT-Files/mailbackup/MailBackup-sys \ No newline at end of file +CT-Files/mailbackup/MailBackup-sys +CT-Files/elkarbackupDEB/rsnapshot.deb +CT-Files/elkarbackupALP/Elkarbackup-installed \ No newline at end of file diff --git a/CT-Build/Alpine.Jenkinsfile b/CT-Build/Alpine.Jenkinsfile index 55728fe..55ae056 100644 --- a/CT-Build/Alpine.Jenkinsfile +++ b/CT-Build/Alpine.Jenkinsfile @@ -1,4 +1,4 @@ -String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' , 'iscsi' , 'z2mqtt' , 'nodered' , 'nodejs' , 'mqtt' , 'mailbackup' ] +String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' , 'iscsi' , 'z2mqtt' , 'nodered' , 'nodejs' , 'mqtt' , 'mailbackup', 'elkarbackupALP' ] pipeline { agent { label 'LXCBuilder' } diff --git a/CT-Build/Alpine.yaml b/CT-Build/Alpine.yaml index c9eead6..1922554 100644 --- a/CT-Build/Alpine.yaml +++ b/CT-Build/Alpine.yaml @@ -266,6 +266,7 @@ files: variants: - gitea - nextcloud + - elkarbackupALP ## for run only version - path: /root/ReadMe @@ -345,6 +346,13 @@ files: variants: - mailbackup +#FileForElkarbackup +- path: /opt/Setup + generator: copy + source: CT-Files/elkarbackupALP + variants: + - elkarbackupALP + packages: manager: apk update: true @@ -364,6 +372,7 @@ packages: - nginx - nextcloud - mailbackup + - elkarbackupALP #PKGS for Default - packages: @@ -511,6 +520,32 @@ packages: variants: - mailbackup +#PKGS for Elkarbackup + - packages: + - rsnapshot + - php7 + - php7-openssl + - php7-phar + - php7-mbstring + - php7-iconv + - php7-json + - php7-ctype + - php7-xml + - php7-tokenizer + - php7-dom + - php7-session + - php7-simplexml + - php7-posix + - php7-fpm + - php7-pdo_mysql + - php7-pcntl + - php7-fileinfo + - coreutils + - sudo + action: install + variants: + - elkarbackupALP + repositories: - name: /etc/apk/repositories url: |- @@ -579,6 +614,7 @@ actions: - nginx - nextcloud - mailbackup + - elkarbackupALP #Run provided init script - trigger: post-files @@ -597,6 +633,7 @@ actions: - mqtt - hass - mailbackup + - elkarbackupALP # Enable service for iscsi CT - trigger: post-files diff --git a/CT-Build/Debian.yaml b/CT-Build/Debian.yaml index 4c646e1..bac925f 100644 --- a/CT-Build/Debian.yaml +++ b/CT-Build/Debian.yaml @@ -944,6 +944,13 @@ files: variants: - aptcacherng +#FileForElkarbackup +- path: /opt/Setup + generator: copy + source: CT-Files/elkarbackupDEB + variants: + - elkarbackupDEB + packages: manager: apt update: true @@ -966,6 +973,7 @@ packages: - tvheadend - x2go - aptcacherng + - elkarbackupDEB #Https Repo pkgs - packages: @@ -1207,6 +1215,15 @@ packages: variants: - aptcacherng +#elkarbackupDEB pkgs + - packages: + - nano + - cron + - ssl-cert + action: install + variants: + - elkarbackupDEB + repositories: - name: sources.list @@ -1278,6 +1295,13 @@ packages: variants: - x2go +#Elkarbackup Repo + - name: elkarbackup.list + url: |- + deb [signed-by=/usr/share/keyrings/elkarbackup-archive-keyring.gpg arch=amd64] http://elkarbackup.org/apt/debian bullseye main + variants: + - elkarbackupDEB + actions: - trigger: post-unpack action: |- @@ -1329,6 +1353,7 @@ actions: - smb - x2go - aptcacherng + - elkarbackupDEB - trigger: post-packages action: |- @@ -1431,5 +1456,13 @@ actions: variants: - x2go +#ElkarBackup Repo key +- trigger: post-unpack + action: |- + #!/bin/sh + curl --retry 7 --retry-delay 5 -L -s http://elkarbackup.org/apt/archive.gpg.key | gpg --dearmor > /usr/share/keyrings/elkarbackup-archive-keyring.gpg + variants: + - elkarbackupDEB + mappings: architecture_map: debian \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Configs/crontab b/CT-Files/elkarbackupALP/Configs/crontab new file mode 100644 index 0000000..3b89e92 --- /dev/null +++ b/CT-Files/elkarbackupALP/Configs/crontab @@ -0,0 +1 @@ +* * * * * APP_ENV=prod APP_DEBUG=0 php /opt/elkarbackup/srv/bin/console elkarbackup:tick \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Configs/elkarbackupconf.yaml b/CT-Files/elkarbackupALP/Configs/elkarbackupconf.yaml new file mode 100644 index 0000000..811a60f --- /dev/null +++ b/CT-Files/elkarbackupALP/Configs/elkarbackupconf.yaml @@ -0,0 +1,27 @@ +parameters: + database_driver: pdo_mysql + database_host: DBServer + database_port: null + database_name: DBName + database_user: DBUser + database_password: DBPass + mailer_transport: smtp + mailer_host: localhost + mailer_user: null + mailer_password: null + locale: en + secret: ElkarToken + database_path: null + upload_dir: /opt/elkarbackup/uploads + public_key: /opt/elkarbackup/home/.ssh/id_rsa.pub + max_log_age: P1Y + tmp_dir: /tmp + rsnapshot: /usr/bin/rsnapshot + warning_load_level: 0.8 + pagination_lines_per_page: 20 + url_prefix: null + disable_background: true + mailer_from: null + home: /opt/elkarbackup/home + max_parallel_jobs: 1 + post_on_pre_fail: true \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Configs/nginx.conf b/CT-Files/elkarbackupALP/Configs/nginx.conf new file mode 100644 index 0000000..5fe3e0f --- /dev/null +++ b/CT-Files/elkarbackupALP/Configs/nginx.conf @@ -0,0 +1,56 @@ +user nginx; +worker_processes auto; +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + server_tokens off; + client_body_buffer_size 10K; + client_header_buffer_size 1k; + client_max_body_size 8m; + large_client_header_buffers 4 4k; + server_names_hash_bucket_size 64; + root /usr/share/nginx/html; + include /etc/nginx/mime.types; + default_type application/octet-stream; + access_log off; + error_log /var/log/nginx/error.log; + #Server config for RainLoop +server { + listen 80 default_server; + listen [::]:80 default_server; + root /opt/elkarbackup/srv/public; + index index.html index.php; + server_name _; + + location / { + try_files $uri /index.php$is_args$args; + } + + location ~ ^/index\.php(/|$) { + fastcgi_pass unix:/run/php-fpm7/php-fpm.sock; + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + fastcgi_param APP_ENV prod; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + internal; + } + + location ~ \.php$ { + return 404; + } + + +} + +} \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Configs/php.conf b/CT-Files/elkarbackupALP/Configs/php.conf new file mode 100644 index 0000000..42f9d0e --- /dev/null +++ b/CT-Files/elkarbackupALP/Configs/php.conf @@ -0,0 +1,15 @@ +[elkarbackup] +user = nginx +group = nginx +listen = /run/php-fpm7/php-fpm.sock +listen.owner = nginx +listen.group = nginx +php_admin_value[error_log] = /var/log/php-fpm.error.log +php_admin_value [date.timezone] = Europe/Amsterdam + +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +chdir = / \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Configs/phpTimezone.ini b/CT-Files/elkarbackupALP/Configs/phpTimezone.ini new file mode 100644 index 0000000..cb46e97 --- /dev/null +++ b/CT-Files/elkarbackupALP/Configs/phpTimezone.ini @@ -0,0 +1,2 @@ +[Date] +date.timezone = Europe/Amsterdam \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Configs/sudofile b/CT-Files/elkarbackupALP/Configs/sudofile new file mode 100644 index 0000000..5e3c324 --- /dev/null +++ b/CT-Files/elkarbackupALP/Configs/sudofile @@ -0,0 +1,3 @@ +Cmnd_Alias ELKARBACKUP_SCRIPTS=/opt/elkarbackup/uploads/* +Defaults!ELKARBACKUP_SCRIPTS env_keep += "ELKARBACKUP_LEVEL ELKARBACKUP_EVENT ELKARBACKUP_URL ELKARBACKUP_ID ELKARBACKUP_PATH ELKARBACKUP_STATUS ELKARBACKUP_CLIENT_NAME ELKARBACKUP_JOB_NAME ELKARBACKUP_OWNER_EMAIL ELKARBACKUP_RECIPIENT_LIST ELKARBACKUP_CLIENT_TOTAL_SIZE ELKARBACKUP_JOB_TOTAL_SIZE ELKARBACKUP_JOB_RUN_SIZE ELKARBACKUP_CLIENT_STARTTIME ELKARBACKUP_CLIENT_ENDTIME ELKARBACKUP_JOB_STARTTIME ELKARBACKUP_JOB_ENDTIME ELKARBACKUP_SSH_ARGS" +nginx ALL = NOPASSWD: ELKARBACKUP_SCRIPTS \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-RemoteTrigger.sh b/CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-RemoteTrigger.sh new file mode 100644 index 0000000..1f8c509 --- /dev/null +++ b/CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-RemoteTrigger.sh @@ -0,0 +1,3 @@ +#!/bin/ash +#Shoud be uploaded in Elkarbackup under scrips and set ran as Job Pre and Post +ssh -oStrictHostKeyChecking=no $(echo $ELKARBACKUP_URL | sed 's|:.*||') bash /opt/Elkar-MysqlBackup.sh "$ELKARBACKUP_EVENT" \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-Tool.sh b/CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-Tool.sh new file mode 100644 index 0000000..6d4ee39 --- /dev/null +++ b/CT-Files/elkarbackupALP/Extras/MySQLBackup/MySQLBackup-Tool.sh @@ -0,0 +1,25 @@ +#!/bin/bash +##Should be as "/opt/Elkar-MysqlBackup.sh" on the MySQL server +## MysqlUser needs following Global privilleges: SELECT, PROCESS, SHOW DATABASES, LOCK TABLES, TRIGGER, SHOW VIEW +USER="" +PASSWORD="" +OUTPUT="/tmp/mysqlBCK" + +PRE () { + mkdir $OUTPUT + ExcludeDatabases="Database|information_schema|performance_schema|mysql|sys" + databases=$(mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | egrep -v $ExcludeDatabases) + + for db in $databases; do + if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]] ; then + echo "Dumping database: $db" + mysqldump -u $USER -p$PASSWORD --databases $db > $OUTPUT/$db.sql + fi + done +} + +POST () { + rm -rf /tmp/mysqlBCK +} + +$1 \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Extras/MySQLBackup/ReadMe.md b/CT-Files/elkarbackupALP/Extras/MySQLBackup/ReadMe.md new file mode 100644 index 0000000..a8a0338 --- /dev/null +++ b/CT-Files/elkarbackupALP/Extras/MySQLBackup/ReadMe.md @@ -0,0 +1,25 @@ +# MySQL backup tool for Elkarbackup + +## Explanation +* Elkarbackup server runs `MySQLBackup-RemoteTrigger.sh` before starting the backup to login to the target (MySQL) server to run `MySQLBackup-Tool.sh` with the PRE argument. + This will ask remote mysql to dump all databases to a SQL file to the local temporary backup location (default: /tmp/mysqlBCK) +* Elkarbackup will store the temporary backup location +* Elkarbackup server runs `MySQLBackup-RemoteTrigger.sh` after running the backup to login to the target (MySQL) server to run `MySQLBackup-Tool.sh` with the POST argument. + This will ask the remote to clean the temporary backup location + +## Setup + +### Steps on MySQL Server +* Make sure SSH server is running +1. Add the SSH public key from root@elkarbackupServer and elkarbackupAPP(Downloaded from cogwheel/settings icon > Manage parameters) +2. Create a Mysql user with the following Global privilleges: `SELECT, PROCESS, SHOW DATABASES, LOCK TABLES, TRIGGER, SHOW VIEW` +be carefull with special charactes in the password +3. Save `MySQLBackup-Tool.sh` to `/opt/Elkar-MysqlBackup.sh` +4. Update the variables in `/opt/Elkar-MysqlBackup.sh` to the newly created user + +## Steps Elkarbackup WebUI +1. Under `script` tab add the `MySQLBackup-RemoteTrigger.sh` with `Run as` option Before and After Job +2. Under `Jobs` tab add the MySQL server as Client +3. Under `Jobs` tab> + on the mysql client to add job +4. Set Path to the temporary backup location (default: /tmp/mysqlBCK) + Pre and Post sctipt to the just created `script` \ No newline at end of file diff --git a/CT-Files/elkarbackupALP/Scripts/FirstRun.sh b/CT-Files/elkarbackupALP/Scripts/FirstRun.sh new file mode 100644 index 0000000..d44c498 --- /dev/null +++ b/CT-Files/elkarbackupALP/Scripts/FirstRun.sh @@ -0,0 +1,20 @@ +#!/bin/ash +ThisScriptConfigured=no +##DB +MysqlIP=127.0.0.1 +MysqlUsername=User +MysqlDatabase=DB +MysqlPassword=MysqlPassword + +#Check if script is configured +if [ $ThisScriptConfigured = no ]; then + echo "Script is not configured" + exit +fi + +sed -i -e 's/DBServer/'$MysqlIP'/' -e 's/DBName/'$MysqlDatabase'/' -e 's/DBUser/'$MysqlUsername'/' -e 's/DBPass/'$MysqlPassword'/' -e 's/ElkarToken/'$(tr -dc 'A-Za-z0-9!#%()*+,-.:;<=>?@[]^_{|}~' 2>/dev/null &2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php +fi + +mkdir -p /opt/composer +php /tmp/composer-setup.php --quiet --install-dir=/opt/composer +rm /tmp/composer-setup.php + +#Install elkarbackup +mkdir -p /opt/elkarbackup/srv /opt/elkarbackup/home /opt/elkarbackup/uploads +tar -C /opt/elkarbackup/srv -xzf /opt/Setup/elkb.tar.gz --strip 1 +rm -f /opt/Setup/elkb.tar.gz +chown -R nginx:nginx /opt/elkarbackup +sudo -u nginx php /opt/composer/composer.phar install -n --working-dir=/opt/elkarbackup/srv --no-dev +mv /opt/Setup/Configs/elkarbackupconf.yaml /opt/elkarbackup/srv/config/parameters.yaml +sed -i 's#/var/cache/nginx#/opt/elkarbackup/home#g' /etc/passwd + +#Configure Nginx +rm -rf /etc/nginx/conf.d +mv /opt/Setup/Configs/nginx.conf /etc/nginx/nginx.conf + +#Configure Php +rm -rf /etc/php8/php-fpm.d/* +mv /opt/Setup/Configs/php.conf /etc/php7/php-fpm.d/elkarbackup.conf +mv /opt/Setup/Configs/phpTimezone.ini /etc/php7/conf.d/04_date_timezone.ini + +#Configure Crontab +mv /opt/Setup/Configs/crontab /etc/crontabs/nginx + +#Configure Sudo +mv /opt/Setup/Configs/sudofile /etc/sudoers.d/elkarbackup + +#Enable services on boot +rc-update add nginx +rc-update add php-fpm7 \ No newline at end of file diff --git a/CT-Files/elkarbackupDEB/Configs/elkarbackupconf.yaml b/CT-Files/elkarbackupDEB/Configs/elkarbackupconf.yaml new file mode 100644 index 0000000..3750c78 --- /dev/null +++ b/CT-Files/elkarbackupDEB/Configs/elkarbackupconf.yaml @@ -0,0 +1,27 @@ +parameters: + database_driver: pdo_mysql + database_host: DBServer + database_port: null + database_name: DBName + database_user: DBUser + database_password: DBPass + mailer_transport: smtp + mailer_host: localhost + mailer_user: null + mailer_password: null + locale: en + secret: ElkarToken + database_path: null + upload_dir: /var/spool/elkarbackup/uploads + public_key: /var/lib/elkarbackup/.ssh/id_rsa.pub + max_log_age: P1Y + tmp_dir: /tmp + rsnapshot: /usr/bin/rsnapshot + warning_load_level: 0.8 + pagination_lines_per_page: 20 + url_prefix: null + disable_background: true + mailer_from: null + home: /var/lib/elkarbackup + max_parallel_jobs: 1 + post_on_pre_fail: true \ No newline at end of file diff --git a/CT-Files/elkarbackupDEB/Scripts/FirstRun.sh b/CT-Files/elkarbackupDEB/Scripts/FirstRun.sh new file mode 100644 index 0000000..21bdf18 --- /dev/null +++ b/CT-Files/elkarbackupDEB/Scripts/FirstRun.sh @@ -0,0 +1,16 @@ +#!/bin/ash +ThisScriptConfigured=no +##DB +MysqlIP=127.0.0.1 +MysqlUsername=elkarbackup +MysqlDatabase=elkarbackup +MysqlPassword=Password + +#Check if script is configured +if [ $ThisScriptConfigured = no ]; then + echo "Script is not configured" + exit +fi + +sed -i -e 's/DBServer/'$MysqlIP'/' -e 's/DBName/'$MysqlDatabase'/' -e 's/DBUser/'$MysqlUsername'/' -e 's/DBPass/'$MysqlPassword'/' -e 's/ElkarToken/'$(tr -dc 'A-Za-z0-9!#%()*+,-.:;<=>?@[]^_{|}~' 2>/dev/null `:8096 + ## domoticz * Available on http://``:8080 + ## transfersh * Available on http://``:8080 + ## omadaV3 * To set-up the system follow the initial set-up wizard on http://``:8088 + ## docker * Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh` This container can be set up in two ways 1. As controller with portainer 2. As remote with docker tcp on port 2375 3. BONUS if FistRun script is skipped the CT has clean docker + ## iscsi ### In Proxmox * Run following commands @@ -206,6 +220,13 @@ lxc.mount.entry: /dev/ttyACM-Zwave dev/ttyACM-Zwave none bind,optional,create=fi * Info html page available on http://``:80 * Add user/storage space by running `ash /opt/AddMailBox.sh` +## elkarbackup +1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh` +2. Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh` +3. Available on http://`` (Default username/password: root/root +4. Click cogwheel/settings icon > Manage backup locations >New (make sure to create this directory and set ngix as the owner) +5. Add a retention policy under the `Policies` tab + # Further CT documentation ## iscsi @@ -219,7 +240,6 @@ create exit ``` - ### Add Drive #### In Proxmox * Create LVM Volume (Available @ /dev/``/``) diff --git a/Scripts/GetExternalResources.sh b/Scripts/GetExternalResources.sh index b10b905..1205682 100644 --- a/Scripts/GetExternalResources.sh +++ b/Scripts/GetExternalResources.sh @@ -32,4 +32,10 @@ echo "$(curl -s https://api.github.com/repos/RainLoop/rainloop-webmail/releases/ echo "$OfflineIMAPVer" > CT-Files/mailbackup/OfflineIMAP3-installed GetResource mailbackup rlcl.zip http://www.rainloop.net/repository/webmail/rainloop-community-latest.zip GetResource mailbackup olim3.tar.gz https://github.com/OfflineIMAP/offlineimap3/archive/refs/tags/$OfflineIMAPVer.tar.gz -o /tmp/ -git clone https://git.bprieshof.nl/Tools/MailBackup-sys.git CT-Files/mailbackup/MailBackup-sys \ No newline at end of file +git clone https://git.bprieshof.nl/Tools/MailBackup-sys.git CT-Files/mailbackup/MailBackup-sys + +GetResource elkarbackupDEB rsnapshot.deb http://ftp.debian.org/debian/pool/main/r/rsnapshot/rsnapshot_1.4.2-1_all.deb + +elkarbackupVER="$(curl -s https://api.github.com/repos/elkarbackup/elkarbackup/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")" +echo "$elkarbackupVER" > CT-Files/elkarbackupALP/Elkarbackup-installed +GetResource elkarbackupALP elkb.tar.gz https://github.com/elkarbackup/elkarbackup/archive/refs/tags/$elkarbackupVER.tar.gz -o /tmp/ \ No newline at end of file