s3_db_assets_backup 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ namespace :db do
13
13
  file_name = "#{RAILS_ENV}_dump-#{datestamp}.sql.gz"
14
14
  backup_file = File.join(base_path, "tmp", file_name)
15
15
  db_config = ActiveRecord::Base.configurations[RAILS_ENV]
16
- sh "mysqldump -u #{db_config['username']} -p#{db_config['password']} -Q --add-drop-table -O add-locks=FALSE -O lock-tables=FALSE #{db_config['database']} | gzip -c > #{backup_file}"
16
+ sh "mysqldump -u #{db_config['username']} -p#{db_config['password']} --default-character-set=latin1 -N -Q --add-drop-table add-locks=FALSE lock-tables=FALSE #{db_config['database']} | gzip -c > #{backup_file}"
17
17
  AWS::S3::S3Object.store(file_name, open(backup_file), BUCKET)
18
18
  puts "Created backup: #{file_name}"
19
19
  FileUtils.rm_rf(backup_file)
@@ -66,7 +66,7 @@ namespace :db do
66
66
  end
67
67
  end
68
68
  puts "download complete, restoring to #{RAILS_ENV} database"
69
- sh "gzip -dc #{backup_file} | mysql -u #{db_config['username']} -p#{db_config['password']} #{db_config['database']}"
69
+ sh "gzip -dc #{backup_file} | mysql -u #{db_config['username']} -p#{db_config['password']} #{db_config['database']} --default-character-set=latin1 -N"
70
70
  puts "cleaning up..."
71
71
  FileUtils.rm_rf(backup_file)
72
72
  puts "Finished"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: s3_db_assets_backup
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chris Barnes
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-25 00:00:00 Z
13
+ date: 2012-05-11 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: Generates rake tasks for backing up and restoring your database and public folder (which should also contain any uploaded assets) to and from an existing bucket in your Amazon S3 account. The rake tasks compresses and uploads each backup with a time stamp and the config file allows you to set how many of each backup to keep. This gem is based on (http://www.magnionlabs.com/2009/7/7/db-backups).
@@ -54,9 +54,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  requirements: []
55
55
 
56
56
  rubyforge_project:
57
- rubygems_version: 1.8.23
57
+ rubygems_version: 1.7.2
58
58
  signing_key:
59
59
  specification_version: 3
60
60
  summary: Generates rake tasks for backing up and restoring db and public folder to and from an existing S3 bucket
61
61
  test_files: []
62
62
 
63
+ has_rdoc: