File tree 3 files changed +42
-0
lines changed
vagrant/provisioning/roles/mystamps-backup
3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ # /etc/cron.d/mystamps-backup-remote file for backuping my-stamps.ru data to remote host
2
+ MAILTO=coder
3
+ #
4
+ # min hour dom mon dow user command
5
+ 45 0 * * * mystamps duplicity --name=uploads --no-compression --no-encryption /data/uploads {{ uploads_target_url }} 2>&1
6
+ 50 0 * * * mystamps PASSPHRASE='{{ gpg_passphrase }}' duplicity --name=mysql-backups --no-compression /data/backups {{ mysql_backups_target_url }} 2>&1
Original file line number Diff line number Diff line change 1
1
---
2
2
user_db_password : p@ssword
3
+ # Target urls should be in a format that is supported by duplicity(1):
4
+ # http://www.nongnu.org/duplicity/duplicity.1.html#sect7
5
+ uploads_target_url : file:///tmp/uploads
6
+ mysql_backups_target_url : file:///tmp/mysql-backups
7
+ # Passphrase for GPG to encrypt archives
8
+ gpg_passphrase :
Original file line number Diff line number Diff line change 33
33
path : /etc/cron.d/mystamps
34
34
state : absent
35
35
36
+ - name : Installing duplicity
37
+ apt :
38
+ package : duplicity
39
+ state : present
40
+
41
+ - name : Creating /etc/duplicity directory
42
+ file :
43
+ path : /etc/duplicity
44
+ state : directory
45
+ owner : root
46
+ group : root
47
+ mode : ' 0755'
48
+
49
+ - name : Downloading /etc/duplicity/cacert.pem
50
+ command : curl https://curl.haxx.se/ca/cacert.pem -o cacert.pem
51
+ args :
52
+ chdir : /etc/duplicity
53
+ creates : /etc/duplicity/cacert.pem
54
+ warn : no
55
+
56
+ - name : Creating a cron task for backup to a remote host
57
+ template :
58
+ src : ../../src/main/config/cron/mystamps-backup-remote
59
+ dest : /etc/cron.d/mystamps-backup-remote
60
+ force : yes
61
+ backup : no
62
+ owner : root
63
+ group : root
64
+ mode : ' 0600'
65
+
You can’t perform that action at this time.
0 commit comments