summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-31 14:42:20 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-31 14:42:20 +0100
commitd3af3a902ef110b50abcc599962bc856eefe4428 (patch)
tree2c53389835b1fbb6acda467793e27ed060a08dc8 /config
parentd7776c30e782470e6fb2cb795a8fadbba8465fc2 (diff)
Fixed the backup config.
Diffstat (limited to 'config')
-rw-r--r--config/backup.rb65
1 files changed, 38 insertions, 27 deletions
diff --git a/config/backup.rb b/config/backup.rb
index a7d98c3..4a48ac5 100644
--- a/config/backup.rb
+++ b/config/backup.rb
@@ -1,32 +1,43 @@
# encoding: utf-8
-##
-# Backup
-# Generated Main Config Template
-#
-# For more information:
-#
-# View the Git repository at https://github.com/meskyanichi/backup
-# View the Wiki/Documentation at https://github.com/meskyanichi/backup/wiki
-# View the issue log at https://github.com/meskyanichi/backup/issues
+require 'inifile'
+SYSTEM_ODBC_CONFIGURATION = IniFile.load('/var/lib/freeswitch/.odbc.ini')
-##
-# Global Configuration
-# Add more (or remove) global configuration below
-#
-# Backup::Storage::S3.defaults do |s3|
-# s3.access_key_id = "my_access_key_id"
-# s3.secret_access_key = "my_secret_access_key"
-# end
-#
-# Backup::Encryptor::OpenSSL.defaults do |encryption|
-# encryption.password = "my_password"
-# encryption.base64 = true
-# encryption.salt = true
-# end
+Backup::Model.new(:gs5, 'GS5 backup') do
+
+ ##
+ # Split [Splitter]
+ #
+ # Split the backup file in to chunks of 2 GB
+ # if the backup file size exceeds 2 GB
+ #
+ split_into_chunks_of 2048
+
+ ##
+ # MySQL [Database]
+ #
+ database MySQL do |db|
+ # To dump all databases, set `db.name = :all` (or leave blank)
+ db.name = SYSTEM_ODBC_CONFIGURATION['gemeinschaft']['DATABASE']
+ db.username = SYSTEM_ODBC_CONFIGURATION['gemeinschaft']['USER']
+ db.password = SYSTEM_ODBC_CONFIGURATION['gemeinschaft']['PASSWORD']
+ db.host = "localhost"
+ db.port = 3306
+ db.socket = "/var/run/mysqld/mysqld.sock"
+ end
+
+ ##
+ # Local (Copy) [Storage]
+ #
+ store_with Local do |local|
+ local.path = "/var/backups/"
+ local.keep = 5
+ end
+
+ ##
+ # Gzip [Compressor]
+ #
+ compress_with Gzip
-##
-# Load all models from the models directory (after the above global configuration blocks)
-Dir[File.join(File.dirname(Config.config_file), "models", "*.rb")].each do |model|
- instance_eval(File.read(model))
end
+