Sha256: 6bab6d936129f35ad3ce209485a11ccffcac5f2b3d64eea7058f8ab291437cf8

Contents?: true

Size: 780 Bytes

Versions: 12

Compression:

Stored size: 780 Bytes

Contents

gem 'keepitsafe'
require 'keepitsafe'

mail_options = eval(File.read(File.expand_path("~/.config/smtp.rb"))) # Read email options, same key names as for mail gem.

ErrorMail.setup("backup_script@yourdomain.com","you@yourdomain.com",mail_options)
BackupReport.new("backup_script@yourdomain.com","you@yourdomain.com",mail_options) do 
   
     Keepitsafe.new("yourdomain.com") do |backup|
     
       backup.all_mongo 750 # Throws an error if the db is biggar than 750 meg
       backup.all_postgres 100 # Throws an error if the db is biggar than 100 meg
     
       backup.files "/var/rails/yourapp/shared/uploads/"
       backup.tar_gz # Lets save some space
       backup.scp "backup.yourdomain.com" # Copy the backup of site
       backup.remove_old_backups
     
     end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
keepitsafe-0.2.6 example/server.com.rb
keepitsafe-0.2.5 example/server.com.rb
keepitsafe-0.2.4 example/server.com.rb
keepitsafe-0.2.3 example/server.com.rb
keepitsafe-0.2.2 example/server.com.rb
keepitsafe-0.2.1 example/server.com.rb
keepitsafe-0.2.0 example/server.com.rb
keepitsafe-0.1.10 example/server.com.rb
keepitsafe-0.1.7 example/server.com.rb
keepitsafe-0.1.5 example/server.com.rb
keepitsafe-0.1.4 example/server.com.rb
keepitsafe-0.1.3 example/server.com.rb