MyNixOS website logo
option

services.znapzend.zetup.<name>.presnap

Command to run before snapshots are taken on the source dataset, e.g. for database locking/flushing. See also postsnap.

Declarations
Type
null or string
Default
null
Example
''${pkgs.mariadb}/bin/mysql -e "set autocommit=0;flush tables with read lock;\\! ${pkgs.coreutils}/bin/sleep 600" &amp;  ${pkgs.coreutils}/bin/echo $! &gt; /tmp/mariadblock.pid ; sleep 10''