snapsync 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -3
- data/lib/snapsync/auto_sync.rb +6 -1
- data/lib/snapsync/timeline_sync_policy.rb +2 -2
- data/lib/snapsync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f6542443b1ff40bd7406fb68c42ce183562ad68
|
4
|
+
data.tar.gz: d181ac3b9658ce0c309f13fcff710b0c7003bb69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88057a0d14f43499e074f42f3c7cbbd84b09411df4e53e57ca0e4654e43bcc0647102d32164f462fc3cc35560337aab645fa21cd6f5305151dda6936603dc3d1
|
7
|
+
data.tar.gz: 2b8d3cfbf41498a2ccc0baa55c2cb6651228c68f4ca78e78a93af6edd677082f0084fd5907e94f3b3188c280f0e595052eff37aac2589274d62eb2a694f45534
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ first and do
|
|
36
36
|
This will create snapsync targets for each of the snapper configurations
|
37
37
|
currently present on the system (i.e. if there is a 'home' and 'root'
|
38
38
|
configurations, it will create /path/to/the/drive/snapsync/root and
|
39
|
-
/path/to/the/drive/snapsync/
|
39
|
+
/path/to/the/drive/snapsync/home). The 'default' synchronization policy is used
|
40
40
|
(see below for other options).
|
41
41
|
|
42
42
|
If you use systemd, the background systemd job will from now on synchronize the
|
@@ -71,13 +71,24 @@ provided by auto-sync, run 'snapsync' without arguments to get all the
|
|
71
71
|
possibilities. Targets have configuration files that allow to fine-tune
|
72
72
|
snapsync's automated behaviour to that effect.
|
73
73
|
|
74
|
+
## Future development
|
75
|
+
|
76
|
+
The main two functionalities that I plan to add to snapsync are having a
|
77
|
+
per-session service that provides notifications of what snapsync is doing, and
|
78
|
+
remote backup (through e.g. SSH)
|
79
|
+
|
74
80
|
## Development
|
75
81
|
|
76
|
-
To
|
82
|
+
To develop snapsync, clone this repository and install the dependencies
|
83
|
+
|
84
|
+
$ git clone https://github.com/doudou/snapsync
|
85
|
+
$ cd snapsync
|
86
|
+
$ bundler install --path=vendor/
|
87
|
+
$ sudo bundler exec bin/snapsync
|
77
88
|
|
78
89
|
## Contributing
|
79
90
|
|
80
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
91
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/doudou/snapsync.
|
81
92
|
|
82
93
|
## License
|
83
94
|
|
data/lib/snapsync/auto_sync.rb
CHANGED
@@ -74,7 +74,12 @@ module Snapsync
|
|
74
74
|
if !mp
|
75
75
|
if t.automount
|
76
76
|
Snapsync.info "partition #{t.partition_uuid} is present, but not mounted, automounting"
|
77
|
-
|
77
|
+
begin
|
78
|
+
mp = fs.Mount([]).first
|
79
|
+
rescue Exception => e
|
80
|
+
Snapsync.warn "failed to mount, ignoring this target"
|
81
|
+
next
|
82
|
+
end
|
78
83
|
mp = Pathname.new(mp)
|
79
84
|
mounted = true
|
80
85
|
else
|
@@ -60,8 +60,8 @@ module Snapsync
|
|
60
60
|
end
|
61
61
|
elsif period == :month
|
62
62
|
count.times do
|
63
|
-
timeline <<
|
64
|
-
|
63
|
+
timeline << beginning_of_month.to_time
|
64
|
+
beginning_of_month = beginning_of_month.prev_month
|
65
65
|
end
|
66
66
|
elsif period == :week
|
67
67
|
count.times do
|
data/lib/snapsync/version.rb
CHANGED