add some sections to block backup chapter
This commit is contained in:
parent
b5f8a87c86
commit
ca2f7039cc
2 changed files with 32 additions and 3 deletions
|
@ -68,6 +68,12 @@ let
|
||||||
|
|
||||||
optionsDocs = buildOptionsDocs {
|
optionsDocs = buildOptionsDocs {
|
||||||
modules = allModules ++ [ scrubbedModule ];
|
modules = allModules ++ [ scrubbedModule ];
|
||||||
|
variablelistId = "selfhostblocks-block-backup-options";
|
||||||
|
includeModuleSystemOptions = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
backupOptionsDocs = buildOptionsDocs {
|
||||||
|
modules = [ ../modules/blocks/backup.nix scrubbedModule ];
|
||||||
variablelistId = "selfhostblocks-options";
|
variablelistId = "selfhostblocks-options";
|
||||||
includeModuleSystemOptions = false;
|
includeModuleSystemOptions = false;
|
||||||
};
|
};
|
||||||
|
@ -123,6 +129,11 @@ in stdenv.mkDerivation {
|
||||||
'@OPTIONS_JSON@' \
|
'@OPTIONS_JSON@' \
|
||||||
${optionsDocs.optionsJSON}/share/doc/nixos/options.json
|
${optionsDocs.optionsJSON}/share/doc/nixos/options.json
|
||||||
|
|
||||||
|
substituteInPlace ./modules/blocks/backup/docs/default.md \
|
||||||
|
--replace \
|
||||||
|
'@OPTIONS_JSON@' \
|
||||||
|
${backupOptionsDocs.optionsJSON}/share/doc/nixos/options.json
|
||||||
|
|
||||||
find . -name "*.md" -print0 | \
|
find . -name "*.md" -print0 | \
|
||||||
while IFS= read -r -d ''' f; do
|
while IFS= read -r -d ''' f; do
|
||||||
substituteInPlace "''${f}" \
|
substituteInPlace "''${f}" \
|
||||||
|
|
|
@ -11,7 +11,9 @@ Two implementations for this block are provided:
|
||||||
|
|
||||||
No integration tests are provided yet.
|
No integration tests are provided yet.
|
||||||
|
|
||||||
## One folder backed up to mounted hard drives {#blocks-backup-config-one}
|
## Usage {#usage}
|
||||||
|
|
||||||
|
### One folder backed up to mounted hard drives {#blocks-backup-config-one}
|
||||||
|
|
||||||
The following snippet shows how to configure backup of 1 folder using the Restic implementation to 1
|
The following snippet shows how to configure backup of 1 folder using the Restic implementation to 1
|
||||||
repository.
|
repository.
|
||||||
|
@ -77,7 +79,7 @@ borgmatic:
|
||||||
|
|
||||||
You can have both borgmatic and restic implementations working at the same time.
|
You can have both borgmatic and restic implementations working at the same time.
|
||||||
|
|
||||||
## One folder backed up to S3 {#blocks-backup-config-remote}
|
### One folder backed up to S3 {#blocks-backup-config-remote}
|
||||||
|
|
||||||
> This is only supported by the Restic implementation.
|
> This is only supported by the Restic implementation.
|
||||||
|
|
||||||
|
@ -115,7 +117,7 @@ The Sops file has a new required field:
|
||||||
+ AWS_SECRET_ACCESS_KEY=<aws_secret_key>
|
+ AWS_SECRET_ACCESS_KEY=<aws_secret_key>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Multiple folder to multiple destinations {#blocks-backup-config-multiple}
|
### Multiple folder to multiple destinations {#blocks-backup-config-multiple}
|
||||||
|
|
||||||
The following snippet shows how to configure backup of any number of folders using the Restic
|
The following snippet shows how to configure backup of any number of folders using the Restic
|
||||||
implementation to 3 repositories, each happening at different times to avoid contending for I/O
|
implementation to 3 repositories, each happening at different times to avoid contending for I/O
|
||||||
|
@ -206,3 +208,19 @@ below) is the former splits the backups into sub-folders on the repositories.
|
||||||
```nix
|
```nix
|
||||||
shb.backup.instances.all = backupcfg repos ["/var/lib/myfolder1" "/var/lib/myfolder2"];
|
shb.backup.instances.all = backupcfg repos ["/var/lib/myfolder1" "/var/lib/myfolder2"];
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Monitoring {#monitoring-backup-block}
|
||||||
|
|
||||||
|
[WIP]
|
||||||
|
|
||||||
|
## Maintenance {#monitoring-maintenance}
|
||||||
|
|
||||||
|
[WIP]
|
||||||
|
|
||||||
|
## Options Reference {#opt-backup-block}
|
||||||
|
|
||||||
|
```{=include=} options
|
||||||
|
id-prefix: opt-blocks-backup-
|
||||||
|
list-id: selfhostblocks-block-backup-options
|
||||||
|
source: @OPTIONS_JSON@
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue