24.12.2016 09:09, Anatoli via Cyrus-devel wrote:
[...]
Once the flush is performed and the lock is applied, a (custom) backup
script could create a snapshot of the partition that would hold the
Cyrus data in a safe-to-backup state. Immediately after creating the
snapshot, the lock would be released and the daemon would continue its
normal operation. Then the backup script would be able to safely backup
the data, e.g. create an incremental backup and upload it to some
external storage, then destroy the snapshot.
The better technique is to run snapshot-creating command from inside the
utility which makes the flush and lock:
cyrus_sync2disk --lock-over 'lvcreate -s ...'
That way no race conditions apply. Also, lock is held during the minimal
possible time.
Best,
Vladislav