backup.sh/readme.md

54 lines
1.6 KiB
Markdown
Raw Normal View History

2020-02-20 01:25:50 +00:00
```bash
2020-02-26 17:27:53 +00:00
print_logo () {
2020-02-20 01:25:50 +00:00
cat <<'EOF'
_ _ _
| |__ __ _ ___| | ___ _ _ __ ___| |__
| '_ \ / _` |/ __| |/ / | | | '_ \ / __| '_ \
| |_) | (_| | (__| <| |_| | |_) |\__ \ | | |
|_.__/ \__,_|\___|_|\_\\__,_| .__(_)___/_| |_|
|_|
2021-07-16 04:11:57 +00:00
A wrapper around restic to help control configuration.
2020-02-20 01:25:50 +00:00
EOF
2021-07-16 04:11:57 +00:00
# Copyright (c) 2021 Andrew Davidson
2020-02-20 01:25:50 +00:00
}
print_help () {
echo -e """
Usage:
backup.sh 'command' 'destination'
Supported Commands:
2021-07-16 04:11:57 +00:00
init - intiialize a new backup repository
2020-02-20 01:25:50 +00:00
backup - initiate a backup of the home folder to the destination
2021-07-16 04:11:57 +00:00
check - check repository for consistency
snapshots - list backups on the destination
2020-02-20 01:25:50 +00:00
prune - prune old backups on the destination
2021-07-16 04:11:57 +00:00
stats - print statistics about the backup repository
help - print this help
Required Configuration:
\$XDG_CONFIG_HOME/backup.sh/\$DESTINATION/\$DESTINATION.repo
- Define the repository path in this file
\$XDG_CONFIG_HOME/backup.sh/\$DESTINATION/\$DESTINATION.pwd
- Define the repository password in this file
\$XDG_CONFIG_HOME/backup.sh/\$DESTINATION/\$DESTINATION.paths
- list of paths to be backed up
\$XDG_CONFIG_HOME/backup.sh/\$DESTINATION/\$DESTINATION.exclude
- list of paths to be excluded
\$XDG_CONFIG_HOME/backup.sh/\$DESTINATION/\$DESTINATION.keys
- OPTIONAL: bash exports of required keys for s3/b2 backups
\$XDG_DATA_HOME/backup.sh/\$DESTINATION/\$DESTINATION.log
- empty file for logging
2020-02-20 01:25:50 +00:00
2021-07-16 04:11:57 +00:00
2020-02-20 01:25:50 +00:00
"""
}
```