forked from Antiarchitect/taurus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
90 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ nbproject/* | |
.bundle | ||
.sass-cache/ | ||
public/assets/ | ||
|
||
config/settings.yml | ||
config/settings.local.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Backup::Model.new(:taurus, 'Taurus backup configuration') do | ||
|
||
db_config = YAML.load_file("#{File.dirname(__FILE__)}/database.yml") | ||
app_config = YAML.load_file("#{File.dirname(__FILE__)}/settings.yml") | ||
|
||
database PostgreSQL do |db| | ||
db.name = db_config['production']['database'] | ||
db.username = db_config['production']['username'] | ||
db.password = db_config['production']['password'] | ||
db.host = db_config['production']['host'] | ||
db.port = db_config['production']['port'] | ||
db.skip_tables = ['sessions', 'sessions_id_seq'] | ||
db.additional_options = ['--clean'] | ||
end | ||
|
||
compress_with Bzip2 | ||
|
||
store_with SCP do |server| | ||
server.username = app_config['backup']['server']['username'] | ||
server.password = app_config['backup']['server']['password'] | ||
server.ip = app_config['backup']['server']['ip'] | ||
server.port = app_config['backup']['server']['port'] | ||
server.path = app_config['backup']['server']['path'] | ||
server.keep = app_config['backup']['server']['keep'] | ||
end | ||
|
||
store_with Dropbox do |db| | ||
db.api_key = app_config['backup']['dropbox']['api_key'] | ||
db.api_secret = app_config['backup']['dropbox']['api_secret'] | ||
db.path = app_config['backup']['dropbox']['path'] | ||
db.keep = 5 | ||
end | ||
|
||
store_with Local do |local| | ||
local.path = app_config['backup']['local']['path'] | ||
local.keep = app_config['backup']['local']['keep'] | ||
end | ||
|
||
notify_by Mail do |mail| | ||
mail.on_success = true | ||
mail.on_failure = true | ||
|
||
mail.from = "#{app_config['mailer']['user_name'] || 'andrey.novikov'}@#{app_config['mailer']['domain']|| 'amursu.ru'}" | ||
mail.to = app_config['backup']['email']['to'] | ||
mail.address = app_config['mailer']['address'] | ||
mail.domain = app_config['mailer']['domain'] || 'amursu.ru' | ||
mail.port = app_config['mailer']['port'] | ||
mail.authentication = app_config['mailer']['authentication'] if app_config['mailer']['authentication'] | ||
end | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
RailsConfig.setup do |config| | ||
config.const_name = "Settings" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
mailer: | ||
address: mail.amursu.ru | ||
port: 587 | ||
|
||
analytics: | ||
id: UA-39782423-3 | ||
|
||
backup: | ||
server: | ||
username: user | ||
password: password | ||
ip: 1backup.server.ip.address | ||
port: 22 | ||
path: /data/backups | ||
keep: 50 | ||
dropbox: | ||
api_key: my_key | ||
api_secret: my_secret | ||
path: / | ||
keep: 5 | ||
local: | ||
path: ~/backups | ||
keep: 100 | ||
email: | ||
to: [email protected] |