File tree Expand file tree Collapse file tree 2 files changed +30
-6
lines changed
Expand file tree Collapse file tree 2 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -32,18 +32,32 @@ $ sudo -i
3232# cp backup.conf.sample backup.conf
3333```
3434
35- ### Quick Settings
35+ ### Quick Settings for Google Cloud Storage
3636
37- #### backup.conf
37+ #### Install gsutil
3838
39- * Buckets
39+ ```
40+ # cd /backup
41+ # wget https://storage.googleapis.com/pub/gsutil.tar.gz
42+ # tar zxf gsutil.tar.gz
43+ ```
44+
45+ #### Setup gsutil authentication
4046
41- #### Sync
47+ ```
48+ # /backup/gsutil/gsutil config -o /backup/serverbackup/boto.cfg
49+ ```
50+
51+ #### backup.conf
52+
53+ Edit following entries.
4254
43- Edit sync script.
55+ * Buckets
56+ * Sync
4457
4558```
46- gsutil $1 gs://$2/$3
59+ Buckets=backup-bucket
60+ Sync=/backup/serverbackup/sync.gsutil
4761```
4862
4963#### Backup commands
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ BOTO_PATH=/backup/serverbackup/boto.cfg
4+
5+ if [ " $DRY_RUN " ]; then
6+ /backup/gsutil/gsutil rsync -r $1 gs://$2 /$3
7+ else
8+ /backup/gsutil/gsutil rsync -n -r $1 gs://$2 /$3
9+ fi
10+ exit $?
You can’t perform that action at this time.
0 commit comments