-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup-sample
executable file
·27 lines (21 loc) · 1.02 KB
/
backup-sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# (C) 2020 Stefan Schallenberg
#
# Example Backup Configuration Sciprt
# NB This script is source in bash scripts, so bash syntax applies
# you may want to set variabled:
MY_DEST="myserver.mydomain.xxx"
# General syntax of each backup is
# backup <type> <source> <dest> [ global-options ] [ -- ] [ type-options ]
backup imap "[email protected]" "$MY_DEST:/imap/[email protected]" "imap.mydomain.xxx:143" --srcsecret "/backup/[email protected]" --dstsecret "/backup/tgt.id_rsa"
backup file "/mydir" "$MY_DEST:/mydir-backup" --dstsecret "/backup/tgt.id_rsa"
# you can use rsync options after --:
backup file "/mydir2" "$MY_DEST:/mydir2-backup" --dstsecret "/backup/tgt.id_rsa" \
--hist \
-- "--exclude=/file-not-to-be-backuped"
###### Not implemented in this version yet ###################################
#backup mysql-kube "kube.mydomain.xxx" "$MY_DEST:/mysql"
#
## Not yet clear how to define the interface:
#backup notify --deleted "nafets227.backup <[email protected]" \