about summary refs log tree commit diff
path: root/nixos/tests/restic.nix
AgeCommit message (Collapse)AuthorFilesLines
2023-11-07nixos/restic: allow timer to be disabledRobert Obryk1-0/+1
2023-11-01nixos/restic: fix #264696 and add a regression testRobert Obryk1-0/+11
Make sure that preStart and postStop are included in all cases when they are nonempty.
2023-10-26Merge pull request #212087 from robryk/resticpathsPeder Bergebakken Sundt1-3/+15
nixos/backups/restic: handle cases when both dynamicFileFrom and paths are set
2023-08-28nixos/restic: add wrapper scripts that set parameters for backupajs1241-10/+10
and use in test
2023-08-16nixos/backups/restic: handle cases when both dynamicFileFrom and paths are setRobert Obryk1-3/+15
Also, add a test to verify that it works. This change also removes the part of custom package test that verifies that the correct paths are provided. This is already tested by restore tests. Before this change, setting both paths and dynamicFileFrom would cause paths to be silently ignored. Making that actually apply the obvious interpretation seems to me to be strictly better than prohibiting the two from being set at the same time.
2023-04-30nixos/restic: use private tmp for service unitElias Probst1-18/+18
To reduce the danger of accidentally exposing sensitive files processed by a restic backup to other services/users, enable the `PrivateTmp=` feature of restic service units, which provides a per service isolation of `/tmp` and `/var/tmp`. Co-authored-by: Daniel Nagy <danielnagy@posteo.de>
2023-03-11nixos/restic: generalize cache configurationAlvar Penning1-3/+3
The restic repository cache location defaults to ~/.cache/restic when not overwritten either by the --cache-dir command line parameter or the universal RESTIC_CACHE_DIR environment variable. Currently, the --cache-dir variable is set to only some restic commands, but, e.g., not to the unit's preStart command for the module's initialize option. This results in two distinct cache locations, one at ~/.cache/restic for the initialize commands and one at the configured --cache-dir location for the restic backup command. By explicitly setting RESTIC_CACHE_DIR for the unit, only one cache at the correct location will be used. https://restic.readthedocs.io/en/v0.15.1/manual_rest.html#caching
2023-01-11nixos/restic: add exclude parameterRobert Obryk1-3/+5
This provides an easy way to specify exclude patterns in config. It was already possible via extraBackupOptions; this change creates a simpler, similar to other backup services, way to specify them.
2023-01-11nixos/tests/restic: test that restoring worksRobert Obryk1-12/+25
This commit also moves the indicator files out of the directory that's being backed up, so that the directory remains static throughout the backup operation.
2022-11-28nixos/tests/restic: use machine-readable outputRobert Obryk1-6/+7
This change causes us to stop relying on the way `restic snapshots` formats its human-readable output.
2022-11-28nixos/tests/restic: unify namingRobert Obryk1-17/+23
This commit makes the correspondence between a backup job and location of its repository clearer.
2022-11-28nixos/tests/restic: cleanupRobert Obryk1-3/+20
2022-10-12nixos/restic: make it possible to use the existing backup cache for prune/checkShadaj Laddad1-0/+4
Configures the `--cache-dir` parameter for the prune and check commands run after backing up. For `check`, also adds a `checkOpts` flag to enable using the cache, since that is disabled by default.
2022-07-27nixos/restic: add 'backups.package' option to override the restic package ↵Alan Strohm1-0/+9
(#183028)
2022-06-03nixos/restic: add backup{Prepare,Cleanup}Command optionsOtavio Salvador1-1/+17
The backupPrepareCommand and backupCleanupCommand options offer a way to run a script to prepare for backup and then cleanup it once finish. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2022-06-03nixos/restic: add new repositoryFile optionOtavio Salvador1-0/+7
Allow providing the repository as a file, useful when we don't want it being stored in the Git repository as plain text. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2022-06-02nixos/restic: reformatOtavio Salvador1-85/+85
Apply nixpkgs-fmt on file prior doing changes. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2021-03-21restic: allow prune without backupMatt McHenry1-0/+6
fixes #97820
2021-01-10treewide: simplify pkgs.stdenv.lib -> pkgs.libDominik Xaver Hörl1-1/+1
The library does not depend on stdenv, that `stdenv` exposes `lib` is an artifact of the ancient origins of nixpkgs.
2020-07-06nixos/tests: Add rclone repository to restic testImran Hossain1-14/+41
2020-02-07nixos/tests/restic.nix: add testBruno Bigras1-0/+63