Bash script to backup calendars and addressbooks from a local ownCloud/Nextcloud installation
https://codeberg.org/BernieO/calcardbackup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

153 lines
4.9 KiB

#######################################################
#
# example config file for calcardbackup
# ---------------------------------------
#
# This file is only needed if you don't want to use command line options.
#
# You can either place this file in script's directory, or
# place this file in any location and use option -c|--configfile PATH_TO_FILE.
#
# If no ownCloud/Nextcloud path is given as command line option, calcardbackup tries to find and use
# this config file and all command line options except for -b|--batch will be ignored.
#
# All paths in this config file need to be relative to this file's location or absolute paths!
#
# For clarification, the associated command line options are given in comments.
#
#######################################################
# path to ownCloud/Nextcloud installation
# this is mandatory:
nextcloud_path="/usr/share/nginx/www/"
# URL of Own-/Nextcloud Login-page
# If inbuilt URL autodetection fails, calcardbackup will run, but omit some
# additional checks.
# identical to option -a|--address
nextcloud_url="https://www.my_nextcloud.net/"
# Will cURL trust the servers certificate?
# cURL is used to retrieve status.php of your ownCloud/Nextcloud to
# perform some additional checks. If cURL can't access the URL due to an
# untrustful certificate, calcardbackup will omit these checks, but still work.
# correlates to option -s|--selfsigned
trustful_certificate="yes"
# path to file with usernames (see 'README.md' and 'users.txt.example')
# If you only want to backup items of certain users, then give location of file, which
# contains their usernames, one user per line.
# identical to option -u|--usersfile
users_file=""
# path to folder where backed up files will be saved
# If not declared, folder 'backups/' in script's directory will be created and used.
# identical to option -o|--output
backupfolder="backups/"
# Format of date extension for backup files
# Default is "-%Y-%m-%d" resulting in backup files named
# like "calcardbackup-2017-03-23.tar.gz".
# For syntax, have a look at format options under "man date"
# identical to option -d|--date
date_extension="-%Y-%m-%d"
# Keep backups like time machine
# keeps all backups for the given number of days
# keeps only backups created on mondays for the time before
# the default value of "0" means to keep all backups created ever
# identical to option -ltm|--like-time-machine
keep_days_like_time_machine="0"
# Days to keep old backup files
# the default value of "0" means to never delete backups
# identical to option -r|--remove
delete_backups_older_than="0"
# Compression of backup files
# change to "no" to not compress backup files
# correlates to option -x|--uncompressed
compress="yes"
# Compression method
# Change to "zip" to compress backup as zip (instead of tar.gz)
# Package "zip" needs to be installed.
# correlates to option -z|--zip
compression_method="tar.gz"
# Encryption
# Change "no" to "yes" and give a passphrase in the second line to encrypt
# compressed backup with given passphrase by GnuPG (symmetric AES256).
# Will automatically activate compression.
# Pay attention to the comments about encryption in 'README.md'.
# correlates to option -e|--encrypt
encrypt_backup="no"
gpg_passphrase="1234"
# In-/exclude addressbooks or calendars
# Change to "no" if you do not want to back up the according category.
# correlates to options -na|--no-addressbooks, -nc|--no-calendars
backup_addressbooks="yes"
backup_calendars="yes"
# Backup shared addressbooks/calendars
# Change to "yes" if you want to backup shared addressbooks/calendars.
# This may be used to define all items to be backed up by sharing them to
# one specific user, which is then specified in 'users.txt'.
# Any item will only be backed up once, even if shared.
# NOTE: this option will be ignored if 'users_file' is not used correctly.
# correlates to option -i|--include-shares
include_shares="no"
# nextcloud-snap
# If you are running nextcloud-snap (https://github.com/nextcloud/nextcloud-snap),
# change this to "yes". Set nextcloud_path to nextcloud configuration files.
# By default, this should be "/var/snap/nextcloud/current/nextcloud/".
# Note that calcardbackup has to be run with sudo in order to work with snap installations.
# See example No.6 in README.md
# correlates to option -p|--snap
snap="no"
# save components to separate files
# If set to "yes", instead of creating complete calendars/addressbooks,
# calcardbackup will create separate files for every single component/card
# named: USERNAME-(CALENDARNAME|ADDRESSBOOKNAME)_UID.(ics|vcf).
# Use this option to investigate faulty database entries or to migrate
# calendars/addresbooks to a Radicale caldav/carddav server or to vdirsyncer.
# In this mode, calcardbackup does not modify the data read from the database
# except for adding CR+LF at the end of lines according to RFC5545/RFC6350.
# correlates to option -one|--one-file-per-component
one_file_per_component="no"
######## end of config file for calcardbackup ########