summaryrefslogtreecommitdiff
path: root/app/models/gs5_backup.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-31 12:27:06 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-31 12:27:06 +0100
commitd7776c30e782470e6fb2cb795a8fadbba8465fc2 (patch)
tree77e1503960c910a57093b1a467995ccb740c19d9 /app/models/gs5_backup.rb
parent2a7ddaef6af6b32308b1f5dd9b3f3b53fc11d9fc (diff)
parent68f0f677c5cba6775622d0e50c4315e6361ff5c9 (diff)
Merge branch 'backup' into develop
Diffstat (limited to 'app/models/gs5_backup.rb')
-rw-r--r--app/models/gs5_backup.rb53
1 files changed, 53 insertions, 0 deletions
diff --git a/app/models/gs5_backup.rb b/app/models/gs5_backup.rb
new file mode 100644
index 0000000..928245f
--- /dev/null
+++ b/app/models/gs5_backup.rb
@@ -0,0 +1,53 @@
+# encoding: utf-8
+
+##
+# Backup Generated: gs5_backup
+# Once configured, you can run the backup with the following command:
+#
+# $ backup perform -t gs5_backup [-c <path_to_configuration_file>]
+#
+Backup::Model.new(:gs5_backup, 'GS5 backup') do
+ ##
+ # Split [Splitter]
+ #
+ # Split the backup file in to chunks of 250 megabytes
+ # if the backup file size exceeds 250 megabytes
+ #
+ split_into_chunks_of 640
+
+ ##
+ # 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 = "/tmp/mysql.sock"
+ # Note: when using `skip_tables` with the `db.name = :all` option,
+ # table names should be prefixed with a database name.
+ # e.g. ["db_name.table_to_skip", ...]
+ db.skip_tables = ["skip", "these", "tables"]
+ db.only_tables = ["only", "these" "tables"]
+ db.additional_options = ["--quick", "--single-transaction"]
+ # Optional: Use to set the location of this utility
+ # if it cannot be found by name in your $PATH
+ # db.mysqldump_utility = "/opt/local/bin/mysqldump"
+ end
+
+ ##
+ # Local (Copy) [Storage]
+ #
+ store_with Local do |local|
+ local.path = "/var/backups/gs5"
+ local.keep = 5
+ end
+
+ ##
+ # Gzip [Compressor]
+ #
+ compress_with Gzip
+
+end