· 10 years ago · Feb 03, 2016, 09:33 AM
1Model.new(:rails_db_backup, 'Description for rails_db_backup') do
2
3 split_into_chunks_of 250
4
5 ##
6 # PostgreSQL [Database]
7 #
8 database PostgreSQL do |db|
9 db.name = "xx"
10 db.username = "xx"
11 db.password = "xx"
12 db.host = "localhost"
13 db.port = 5432
14 db.additional_options = ["-xc", "-E=utf8"]
15 end
16
17store_with Dropbox do |db|
18 db.api_key = "xx"
19 db.api_secret = "xx"
20 db.access_type = :app_folder
21 db.path = "/app_db"
22 db.keep = 25
23 end
24
25notify_by Mail do |mail|
26 mail.on_success = true
27 mail.on_warning = true
28 mail.on_failure = true
29
30 mail.from = "xx@gmail.com"
31 mail.to = "xx@gmail.com"
32 mail.address = "smtp.gmail.com"
33 mail.port = 587
34 mail.domain = "gmail.com"
35 mail.user_name = "xxx@gmail.com"
36 mail.password = "xx"
37 mail.authentication = "plain"
38 mail.encryption = :starttls
39 end
40
41 archive :my_archive do |archive|
42 # add a folder (including sub-folders)
43 archive.add '/home/madaarya/apps/xxx/shared/uploads/'
44 end
45
46end