Table of Contents
Description
This is the main script to start a backup. The script backup.sh is the one to add as a cronjob. It will start
- the dumps of local databases
- the file transfer to an external repository
Both of these steps can be started seperately (see next pages).
Typical Usage
- on Linux: as a non root user use sudo
sudo ./backup.sh
- on MS Windows: start it as user
./backup.sh
. Or double click it in a file manager (e.g. Explorer). The first time it asks what program should be used to open *.sh files - select the bash.exe or navigate to it.
Help
# ./backup.sh -?
___ ___ ___ ___ _______ __
| | Y | | | _ .---.-.----| |--.--.--.-----.
|. |. |. | |. 1 | _ | __| <| | | _ |
|. |. \_/ |. |___ |. _ |___._|____|__|__|_____| __|
|: |: | |: 1 | |: 1 \ |__|
|::.|::.|:. |::.. . | |::.. . /
`---`--- ---`-------' `-------'
_______________________________________________________________________________ ___ __ _
Param: show help
START A BACKUP
This script starts
- the database backups and creates dumps locally
- the file backup (using restic or duplicity)
SYNTAX:
backup.sh [OPTIONS]
default: no parameter:
OPTIONS:
-d, --dryrun just show infos, do not start a backup
-h, --help Show this help
The following parameters force the backup type (if using duplicity):
-a, --auto force auto
-o, --older duplicity type=auto: repeat full backup if last full
backup is older than ... like "1M" for 1 month
-f, --full force full backup (if supported)
-i, --inc force incrmenental backup