backup: add a way to stop services before restoring a state.

This commit is contained in:
Jörg Thalheim
2024-06-06 15:17:47 +02:00
parent 0dc3b9f056
commit 5c11a30b46
3 changed files with 47 additions and 14 deletions

View File

@@ -33,6 +33,18 @@
e.g. a database dump
'';
};
# TODO: implement this
#stopOnRestore = lib.mkOption {
# type = lib.types.listOf lib.types.str;
# default = [];
# description = ''
# List of services to stop before restoring the state dir from a backup
# Utilize this to stop services which currently access these folders or or other services affected by the restore
# '';
#};
preRestoreCommand = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
@@ -42,6 +54,7 @@
Utilize this to stop services which currently access these folders
'';
};
postRestoreCommand = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;