From 5a288f6cb457c31d67818ca46532dceb6513e4fb Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 10 Dec 2024 17:50:00 +0100 Subject: [PATCH] ignore ditrctory 'Moved-o-borg2'. --- hosts/Moved-o-borg2/mx.warenform.de.sh | 264 ++++++++++++++++++++++ hosts/Moved-o-borg2/web0.warenform.de.sh | 264 ++++++++++++++++++++++ hosts/Moved-o-borg2/zz-nd.warenform.de.sh | 264 ++++++++++++++++++++++ 3 files changed, 792 insertions(+) create mode 100755 hosts/Moved-o-borg2/mx.warenform.de.sh create mode 100755 hosts/Moved-o-borg2/web0.warenform.de.sh create mode 100755 hosts/Moved-o-borg2/zz-nd.warenform.de.sh diff --git a/hosts/Moved-o-borg2/mx.warenform.de.sh b/hosts/Moved-o-borg2/mx.warenform.de.sh new file mode 100755 index 0000000..9182e82 --- /dev/null +++ b/hosts/Moved-o-borg2/mx.warenform.de.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash + +# --------------------------------------------------- # +# -------------------- Variable --------------------- # +# + +## --------------------------- ## +## - - ## +## - USER SETTINGS - ## +## - - ## +## --------------------------- ## + +## - load default configuration +## - +. $rcopy_conf_file +. $rcopy_functions_file + +## - set hostname, which is wanted to backup +## - +srcHost=mx.warenform.de + + +## - sync via ssh tunnel +## - +## - if syncing via ssh sh_tunnel, create/modify file +## - ~/.ssh/config with the following contents +## - +## - host localhost +## - user back +## - Port 9999 +## - ForwardAgent yes +## - StrictHostKeyChecking no +## - LogLevel FATAL +## - +## - NOTE !! +## - you cannot have different entries for localhost. +## - +## - A ssh tunnel localhost -> $target_host +## - will be created. +## - +ssh_tunnel=false +ssh_tunnel_local_port=9999 +ssh_tunnel_target_port=22 +ssh_tunnel_key_file= + +## - if syncing via ssh hop-host, create/modify file +## - ~/.ssh/config with the following contents +## - +## - host localhost +## - user back +## - Port 9999 +## - ForwardAgent yes +## - StrictHostKeyChecking no +## - LogLevel FATAL +## - +## - NOTE !! +## - you cannot have different entries for localhost. +## - +## - A ssh tunnel localhost -> $hop_host -> $target_host +## - will be created. +## - +ssh_hopping=false +ssh_hop_host=shell.so36.net +hop_host_port=1036 +target_port=1036 +local_port=9999 +ssh_keyfile=$HOME/.ssh/id_dsa + +## - remote user +## - +ssh_user=back + +## - what to store ? +## - + +## - these directories will be archived +## - into one file +## +dir_backup="/etc /home /root /var/spool/vacation /var/spool/cron /var/vmail /var/www /usr/local/dovecot/etc/dovecot /usr/local/apache2/conf /var/lib/dehydrated" + +## - backup network filesystems like nfs or smbfs +## - +## - NOTICE! +## - - mounting network devices is only possible on localhost - YET +## - - if network directory should mount, you need an entry in +## - /etc/fstab +## - +mount_netdir=false +net_mounted_dir_backup="" + + +## - also store mysql databases ? +## - +mysql_backup=false + +## - Since Version 5.6, giving password on command line is considered as insecure. +## - To avoid giving the password on command line, you can use an +## - encrypted option file instead. +## - +## - 1.) Create (encrypted) option file: +## - $ mysql_config_editor set --login-path=local --socket=/tmp/mysql.sock --user=backup --password +## - $ Password: +## - +## - Its possible to hold more than one credentials in this (encrypted) option file: +## - $ mysql_config_editor set --login-path=local-5.6 --socket=/tmp/mysql-5.6.sock --user=backup --password +## - +## - +## - 2.) Set environment variable mysql_credential_args="--login-path=local" +## - Now, the backup script uses the encrypted option file instead of (unencrypt) password +## - on command line. +## - +## - You can backup databases from different mysql installations i.e. for a (main) +## - MySQL installation and a second one using variable 'mysql_credential_args_arr': +## - +## - mysql_credential_args_arr=(":" "":" ... +## - +## - Example: +## - mysql_credential_args_arr=("5.7:--login-path=local" "5.6:--login-path=local-5.6") +## - +#mysql_credential_args_arr="" +mysql_credential_args="--login-path=local" +mysql_user=backup +mysql_password=backup + +## - gzip mysql dump files? +## - +mysql_gzip=false + +## - mysql_max_allowed_packet +## - +## - Set / Change MySQL System Variable '--max-allowed-packet' +## - +## - i.e. prevents errors like: +## - +## - When a client server receives larger packet bytes, an error occurs. The connection faces +## - ER_NET_PACKET_TOO_LARGE error a +## - nd closes instantly. +## - +## - Another error can be +## - Lost Connection to Server During Query Error. +## - It has the same reason, i.e., a large communication packet. +## - +mysql_max_allowed_packet='512M' + + +## - restart apache after mysqldump +## - +restart_apache=false + +## - also store postresql databases ? +## - +pgsql_backup=true +pgsql_user=postgres +## - gzip postgres dump files? +## - +pgsql_gzip=false + + +## - store disk settings +## - +disksetting_backup=false + + +## - store svn repositories ? +## - +svn_backup=false +svn_source_base_path="" +## - gzip SVN backup files? +## - +svn_gzip=false + + +## - backup nextcloud accounts +## - +nextcloud_backup=false + +## - nextcloud_server_url +## - +nextcloud_server_url="https://${srcHost}" + +## - nextcloud_accounts +## - +## - !! Notice !! +## - ============ +## - - delemiter between fields is th backtick sign: '`' +## - - single AND double quote sign CANNOT BE USED as a sign inside a field +## - - the single quote sign is used as begin/end sign for this variable +## - +## - nextcloud_accounts='`[`server_url] [[`server_url] [..' +## - +## - Notice: +## - if 'server_url' is ommited, the value of variable 'nextcloud_server_url', the +## - default on, will be used. +## - +## - Example: +## - +## - nextcloud_accounts=' +## - user1`P4ssw0rd1 +## - user2`P4ssw0rd2`non-default-cloud-server-url +## - ' +## - +nextcloud_accounts='' + + +## - Give rsync arguments here. Maybe you wish +## - to exclude some files or diredtories +## - +## - Note: +## - (Global) rsync options are already defined. See file 'conf/rcopy.conf' +## - +## - Add rsync options: +## - +#rsync_progArgs="$rsync_progArgs " + +## - replace #rsync_progArgs +## - +## - Note: +## - If backup device is on remote host, then rsync needs arguments: +## - +## - "--omit-link-times --munge-links" +## - +## - This is Added automaticaly done in file rcopy.conf and looks liek: +## - +## - if $remote_disk ; then +## - rsync_progArgs="--omit-link-times --munge-links $rsync_progArgs" +## - fi +## - +## - Take care to add this here if needed and rsync_progArgs are replaced!! +## - +#rsync_progArgs=""" +# +#if $remote_disk ; then +# rsync_progArgs="--omit-link-times --munge-links $rsync_progArgs" +#fi + + +## ----------------------------------------------------- +## - +## - the following parameters overwrites the values from +## - the golbal configuration file + + +## - how long to hold backup-files ? +## - +#days=15 + +# a bigger (integer-)value for_DEBUG "1"results in more +# infomation, written to the logFile +# +# possible values: 0 , 1 or 2 +# +#_DEBUG=0 + +# if _TEST is set to "1", nothing will be done. instead +# rsync will just report the actions it would have +# taken to the $logFile +# +#_TEST=0 + +export rcopy_functions_file srcHost ssh_user MIRROR ARCHIVE days _DEBUG _TEST ssh_hopping + +## - Do the stuff - include main part of host script +## - +. $hosts_base_dir/scripts/main_part.include diff --git a/hosts/Moved-o-borg2/web0.warenform.de.sh b/hosts/Moved-o-borg2/web0.warenform.de.sh new file mode 100755 index 0000000..85f1851 --- /dev/null +++ b/hosts/Moved-o-borg2/web0.warenform.de.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash + +# --------------------------------------------------- # +# -------------------- Variable --------------------- # +# + +## --------------------------- ## +## - - ## +## - USER SETTINGS - ## +## - - ## +## --------------------------- ## + +## - load default configuration +## - +. $rcopy_conf_file +. $rcopy_functions_file + +## - set hostname, which is wanted to backup +## - +srcHost=web0.warenform.de + + +## - sync via ssh tunnel +## - +## - if syncing via ssh sh_tunnel, create/modify file +## - ~/.ssh/config with the following contents +## - +## - host localhost +## - user back +## - Port 9999 +## - ForwardAgent yes +## - StrictHostKeyChecking no +## - LogLevel FATAL +## - +## - NOTE !! +## - you cannot have different entries for localhost. +## - +## - A ssh tunnel localhost -> $target_host +## - will be created. +## - +ssh_tunnel=false +ssh_tunnel_local_port=9999 +ssh_tunnel_target_port=22 +ssh_tunnel_key_file= + +## - if syncing via ssh hop-host, create/modify file +## - ~/.ssh/config with the following contents +## - +## - host localhost +## - user back +## - Port 9999 +## - ForwardAgent yes +## - StrictHostKeyChecking no +## - LogLevel FATAL +## - +## - NOTE !! +## - you cannot have different entries for localhost. +## - +## - A ssh tunnel localhost -> $hop_host -> $target_host +## - will be created. +## - +ssh_hopping=false +ssh_hop_host=shell.so36.net +hop_host_port=1036 +target_port=1036 +local_port=9999 +ssh_keyfile=$HOME/.ssh/id_dsa + +## - remote user +## - +ssh_user=back + +## - what to store ? +## - + +## - these directories will be archived +## - into one file +## +dir_backup="/etc /home /root /usr/local/apache2/conf /var/lib/dehydrated /var/www/html /var/spool/cron" + +## - backup network filesystems like nfs or smbfs +## - +## - NOTICE! +## - - mounting network devices is only possible on localhost - YET +## - - if network directory should mount, you need an entry in +## - /etc/fstab +## - +mount_netdir=false +net_mounted_dir_backup="" + + +## - also store mysql databases ? +## - +mysql_backup=true + +## - Since Version 5.6, giving password on command line is considered as insecure. +## - To avoid giving the password on command line, you can use an +## - encrypted option file instead. +## - +## - 1.) Create (encrypted) option file: +## - $ mysql_config_editor set --login-path=local --socket=/tmp/mysql.sock --user=backup --password +## - $ Password: +## - +## - Its possible to hold more than one credentials in this (encrypted) option file: +## - $ mysql_config_editor set --login-path=local-5.6 --socket=/tmp/mysql-5.6.sock --user=backup --password +## - +## - +## - 2.) Set environment variable mysql_credential_args="--login-path=local" +## - Now, the backup script uses the encrypted option file instead of (unencrypt) password +## - on command line. +## - +## - You can backup databases from different mysql installations i.e. for a (main) +## - MySQL installation and a second one using variable 'mysql_credential_args_arr': +## - +## - mysql_credential_args_arr=(":" "":" ... +## - +## - Example: +## - mysql_credential_args_arr=("5.7:--login-path=local" "5.6:--login-path=local-5.6") +## - +#mysql_credential_args_arr="" +#mysql_credential_args="--login-path=local" +mysql_user=backup +mysql_password=backup + +## - gzip mysql dump files? +## - +mysql_gzip=false + +## - mysql_max_allowed_packet +## - +## - Set / Change MySQL System Variable '--max-allowed-packet' +## - +## - i.e. prevents errors like: +## - +## - When a client server receives larger packet bytes, an error occurs. The connection faces +## - ER_NET_PACKET_TOO_LARGE error a +## - nd closes instantly. +## - +## - Another error can be +## - Lost Connection to Server During Query Error. +## - It has the same reason, i.e., a large communication packet. +## - +mysql_max_allowed_packet='512M' + + +## - restart apache after mysqldump +## - +restart_apache=false + +## - also store postresql databases ? +## - +pgsql_backup=false +pgsql_user=postgres +## - gzip postgres dump files? +## - +pgsql_gzip=false + + +## - store disk settings +## - +disksetting_backup=false + + +## - store svn repositories ? +## - +svn_backup=false +svn_source_base_path="" +## - gzip SVN backup files? +## - +svn_gzip=false + + +## - backup nextcloud accounts +## - +nextcloud_backup=false + +## - nextcloud_server_url +## - +nextcloud_server_url="https://${srcHost}" + +## - nextcloud_accounts +## - +## - !! Notice !! +## - ============ +## - - delemiter between fields is th backtick sign: '`' +## - - single AND double quote sign CANNOT BE USED as a sign inside a field +## - - the single quote sign is used as begin/end sign for this variable +## - +## - nextcloud_accounts='`[`server_url] [[`server_url] [..' +## - +## - Notice: +## - if 'server_url' is ommited, the value of variable 'nextcloud_server_url', the +## - default on, will be used. +## - +## - Example: +## - +## - nextcloud_accounts=' +## - user1`P4ssw0rd1 +## - user2`P4ssw0rd2`non-default-cloud-server-url +## - ' +## - +nextcloud_accounts='' + + +## - Give rsync arguments here. Maybe you wish +## - to exclude some files or diredtories +## - +## - Note: +## - (Global) rsync options are already defined. See file 'conf/rcopy.conf' +## - +## - Add rsync options: +## - +#rsync_progArgs="$rsync_progArgs " + +## - replace #rsync_progArgs +## - +## - Note: +## - If backup device is on remote host, then rsync needs arguments: +## - +## - "--omit-link-times --munge-links" +## - +## - This is Added automaticaly done in file rcopy.conf and looks liek: +## - +## - if $remote_disk ; then +## - rsync_progArgs="--omit-link-times --munge-links $rsync_progArgs" +## - fi +## - +## - Take care to add this here if needed and rsync_progArgs are replaced!! +## - +#rsync_progArgs=""" +# +#if $remote_disk ; then +# rsync_progArgs="--omit-link-times --munge-links $rsync_progArgs" +#fi + + +## ----------------------------------------------------- +## - +## - the following parameters overwrites the values from +## - the golbal configuration file + + +## - how long to hold backup-files ? +## - +#days=15 + +# a bigger (integer-)value for_DEBUG "1"results in more +# infomation, written to the logFile +# +# possible values: 0 , 1 or 2 +# +#_DEBUG=0 + +# if _TEST is set to "1", nothing will be done. instead +# rsync will just report the actions it would have +# taken to the $logFile +# +#_TEST=0 + +export rcopy_functions_file srcHost ssh_user MIRROR ARCHIVE days _DEBUG _TEST ssh_hopping + +## - Do the stuff - include main part of host script +## - +. $hosts_base_dir/scripts/main_part.include diff --git a/hosts/Moved-o-borg2/zz-nd.warenform.de.sh b/hosts/Moved-o-borg2/zz-nd.warenform.de.sh new file mode 100755 index 0000000..f6ebfde --- /dev/null +++ b/hosts/Moved-o-borg2/zz-nd.warenform.de.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash + +# --------------------------------------------------- # +# -------------------- Variable --------------------- # +# + +## --------------------------- ## +## - - ## +## - USER SETTINGS - ## +## - - ## +## --------------------------- ## + +## - load default configuration +## - +. $rcopy_conf_file +. $rcopy_functions_file + +## - set hostname, which is wanted to backup +## - +srcHost=nd.warenform.de + + +## - sync via ssh tunnel +## - +## - if syncing via ssh sh_tunnel, create/modify file +## - ~/.ssh/config with the following contents +## - +## - host localhost +## - user back +## - Port 9999 +## - ForwardAgent yes +## - StrictHostKeyChecking no +## - LogLevel FATAL +## - +## - NOTE !! +## - you cannot have different entries for localhost. +## - +## - A ssh tunnel localhost -> $target_host +## - will be created. +## - +ssh_tunnel=false +ssh_tunnel_local_port=9999 +ssh_tunnel_target_port=22 +ssh_tunnel_key_file= + +## - if syncing via ssh hop-host, create/modify file +## - ~/.ssh/config with the following contents +## - +## - host localhost +## - user back +## - Port 9999 +## - ForwardAgent yes +## - StrictHostKeyChecking no +## - LogLevel FATAL +## - +## - NOTE !! +## - you cannot have different entries for localhost. +## - +## - A ssh tunnel localhost -> $hop_host -> $target_host +## - will be created. +## - +ssh_hopping=false +ssh_hop_host=shell.so36.net +hop_host_port=1036 +target_port=1036 +local_port=9999 +ssh_keyfile=$HOME/.ssh/id_dsa + +## - remote user +## - +ssh_user=back + +## - what to store ? +## - + +## - these directories will be archived +## - into one file +## +dir_backup="/etc /home /root /usr/local/apache2/conf /var/www/html/projekte /var/www/html/.gnupg /var/www/html/.ssh /var/spool/cron /var/lib/dehydrated" + +## - backup network filesystems like nfs or smbfs +## - +## - NOTICE! +## - - mounting network devices is only possible on localhost - YET +## - - if network directory should mount, you need an entry in +## - /etc/fstab +## - +mount_netdir=false +net_mounted_dir_backup="" + + +## - also store mysql databases ? +## - +mysql_backup=true + +## - Since Version 5.6, giving password on command line is considered as insecure. +## - To avoid giving the password on command line, you can use an +## - encrypted option file instead. +## - +## - 1.) Create (encrypted) option file: +## - $ mysql_config_editor set --login-path=local --socket=/tmp/mysql.sock --user=backup --password +## - $ Password: +## - +## - Its possible to hold more than one credentials in this (encrypted) option file: +## - $ mysql_config_editor set --login-path=local-5.6 --socket=/tmp/mysql-5.6.sock --user=backup --password +## - +## - +## - 2.) Set environment variable mysql_credential_args="--login-path=local" +## - Now, the backup script uses the encrypted option file instead of (unencrypt) password +## - on command line. +## - +## - You can backup databases from different mysql installations i.e. for a (main) +## - MySQL installation and a second one using variable 'mysql_credential_args_arr': +## - +## - mysql_credential_args_arr=(":" "":" ... +## - +## - Example: +## - mysql_credential_args_arr=("5.7:--login-path=local" "5.6:--login-path=local-5.6") +## - +#mysql_credential_args_arr="" +#mysql_credential_args="--login-path=local" +mysql_user=backup +mysql_password=backup + +## - gzip mysql dump files? +## - +mysql_gzip=false + +## - mysql_max_allowed_packet +## - +## - Set / Change MySQL System Variable '--max-allowed-packet' +## - +## - i.e. prevents errors like: +## - +## - When a client server receives larger packet bytes, an error occurs. The connection faces +## - ER_NET_PACKET_TOO_LARGE error a +## - nd closes instantly. +## - +## - Another error can be +## - Lost Connection to Server During Query Error. +## - It has the same reason, i.e., a large communication packet. +## - +mysql_max_allowed_packet='512M' + + +## - restart apache after mysqldump +## - +restart_apache=false + +## - also store postresql databases ? +## - +pgsql_backup=false +pgsql_user=postgres +## - gzip postgres dump files? +## - +pgsql_gzip=false + + +## - store disk settings +## - +disksetting_backup=false + + +## - store svn repositories ? +## - +svn_backup=false +svn_source_base_path="" +## - gzip SVN backup files? +## - +svn_gzip=false + + +## - backup nextcloud accounts +## - +nextcloud_backup=false + +## - nextcloud_server_url +## - +nextcloud_server_url="https://${srcHost}" + +## - nextcloud_accounts +## - +## - !! Notice !! +## - ============ +## - - delemiter between fields is th backtick sign: '`' +## - - single AND double quote sign CANNOT BE USED as a sign inside a field +## - - the single quote sign is used as begin/end sign for this variable +## - +## - nextcloud_accounts='`[`server_url] [[`server_url] [..' +## - +## - Notice: +## - if 'server_url' is ommited, the value of variable 'nextcloud_server_url', the +## - default on, will be used. +## - +## - Example: +## - +## - nextcloud_accounts=' +## - user1`P4ssw0rd1 +## - user2`P4ssw0rd2`non-default-cloud-server-url +## - ' +## - +nextcloud_accounts='' + + +## - Give rsync arguments here. Maybe you wish +## - to exclude some files or diredtories +## - +## - Note: +## - (Global) rsync options are already defined. See file 'conf/rcopy.conf' +## - +## - Add rsync options: +## - +#rsync_progArgs="$rsync_progArgs " + +## - replace #rsync_progArgs +## - +## - Note: +## - If backup device is on remote host, then rsync needs arguments: +## - +## - "--omit-link-times --munge-links" +## - +## - This is Added automaticaly done in file rcopy.conf and looks liek: +## - +## - if $remote_disk ; then +## - rsync_progArgs="--omit-link-times --munge-links $rsync_progArgs" +## - fi +## - +## - Take care to add this here if needed and rsync_progArgs are replaced!! +## - +#rsync_progArgs=""" +# +#if $remote_disk ; then +# rsync_progArgs="--omit-link-times --munge-links $rsync_progArgs" +#fi + + +## ----------------------------------------------------- +## - +## - the following parameters overwrites the values from +## - the golbal configuration file + + +## - how long to hold backup-files ? +## - +#days=15 + +# a bigger (integer-)value for_DEBUG "1"results in more +# infomation, written to the logFile +# +# possible values: 0 , 1 or 2 +# +#_DEBUG=0 + +# if _TEST is set to "1", nothing will be done. instead +# rsync will just report the actions it would have +# taken to the $logFile +# +#_TEST=0 + +export rcopy_functions_file srcHost ssh_user MIRROR ARCHIVE days _DEBUG _TEST ssh_hopping + +## - Do the stuff - include main part of host script +## - +. $hosts_base_dir/scripts/main_part.include