Multiple devices leads to snapshotting the same filesystem more than once #17
Comments
|
rsbackup could tell each hook whether it's first, last or somewhere in the middle (although it'd have to work out which of these was true). I wonder how this would interact with the request for more concurrency too... |
|
I don't think there is much advantage in attempting concurrency within a single host - you're likely to end up trying to read from the same physical medium; so hopefully the two issues are orthogonal. |
|
We now have https://github.com/ewxrjk/rsbackup/blob/master/src/Action.h to provide concurrent sequencing of actions, only used for pruning operations so far. Obviously the strategy for issue #24 is to use it for backups too. For hooks, some additional concepts are needed.
Can we do the *-access-hooks this way too? I think so but haven't thought through the details. |
|
The above leaves out the detail of how to ensure that snapshots only happen once (in favour of making sure that they happen at the right times). Running hooks only once per volume is attractive; it breaks compatibility but since the motivating application is snapshotting that doesn't seem particularly problematic (notice that the supplied snapshot hook does not access I can't think of an easy way to issue deprecation warnings for accessing |
This makes their function a bit clearer. #17
This makes their function a bit clearer. #17
|
Volume hooks now only run once per volume. This hasn't had real-world testing yet so be a little cautious. |
pre-backup-hook and post-backup-hook are executed for each individual backup; where a backup is a backup of an individual volume onto an individual device. This means that if you're backing up to multiple devices they get run once per (volume,device) tuple.
This would only be ideologically annoying except that the (udev,lvm) system has a number of races/leaks; which seem to be exacerbated if you do a lot of snapshotting in a short space of time.
I can see a number of ways of addressing this issue:
The latter two options have the problem that you might end up filling up your lvm with snapshots; whereas if everything is working OK currently you only have one snapshot at once.
The text was updated successfully, but these errors were encountered: