backuper 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/backuper.rb +5 -5
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.3
|
data/lib/backuper.rb
CHANGED
@@ -30,10 +30,10 @@ class Backuper
|
|
30
30
|
|
31
31
|
if File.exist?("#{local_latest_backup_path}")
|
32
32
|
puts "Performing local backup with hard links to pervious version"
|
33
|
-
system "rsync -az --delete --link-dest=#{local_latest_backup_path} #{source_path} #{local_current_backup_path}"
|
33
|
+
system "nice -n 10 rsync -az --delete --link-dest=#{local_latest_backup_path} #{source_path} #{local_current_backup_path}"
|
34
34
|
else
|
35
35
|
puts "Performing initial local backup"
|
36
|
-
system "rsync -az #{source_path} #{local_current_backup_path}"
|
36
|
+
system "nice -n 10 rsync -az #{source_path} #{local_current_backup_path}"
|
37
37
|
end
|
38
38
|
|
39
39
|
# Cleanup of old versions
|
@@ -46,7 +46,7 @@ class Backuper
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def perform_database_backup
|
49
|
-
if mysql_params == {} mysql_params['database'] == '' || !(mysql_params['adapter'] =~ /mysql/)
|
49
|
+
if mysql_params == {} || mysql_params['database'] == '' || !(mysql_params['adapter'] =~ /mysql/)
|
50
50
|
puts "Skipping MySQL backup as no configurtion given"
|
51
51
|
return
|
52
52
|
end
|
@@ -62,7 +62,7 @@ class Backuper
|
|
62
62
|
# Local backup
|
63
63
|
|
64
64
|
puts "Performing local backup of database '#{mysql_params['database']}' as user '#{mysql_params['username']}'"
|
65
|
-
system "mysqldump #{mysql_params['database']} --user=#{mysql_params['username']} --password=#{mysql_params['password']} > #{local_current_backup_path}"
|
65
|
+
system "nice -n 10 mysqldump #{mysql_params['database']} --user=#{mysql_params['username']} --password=#{mysql_params['password']} > #{local_current_backup_path}"
|
66
66
|
|
67
67
|
# Cleanup of old versions
|
68
68
|
|
@@ -75,7 +75,7 @@ class Backuper
|
|
75
75
|
|
76
76
|
def perform_remote_sync
|
77
77
|
puts "Performing remote backup sync"
|
78
|
-
system "rsync -azH --delete #{local_backup_base_path} #{remote_backup_ssh_info}"
|
78
|
+
system "nice -n 10 rsync -azH --delete #{local_backup_base_path} #{remote_backup_ssh_info}"
|
79
79
|
puts "Done"
|
80
80
|
end
|
81
81
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backuper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 3
|
10
|
+
version: 2.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Aur\xC3\xA9lien Malisart"
|