Commit Graph

384 Commits

Author SHA1 Message Date
Julien Moutinho
6c72f80b41 nixos/sanoid: fix submodule aliases
Use `mkDefault` into `mkAliasDefitinions`.
This avoids conflicting definitions when using `process_children_only`.
2021-07-15 18:28:27 +02:00
Mario Rodas
bb1ff7da54
Merge pull request #125696 from hercules-ci/postgresql-backup-only-replace-if-successful
nixos/postgresqlBackup: only replace if successful
2021-07-07 18:41:57 -05:00
Guillaume Girol
72894352b8 nixos/btrbk: add module and test 2021-07-03 17:18:20 +02:00
Sandro
30e2735f5d
Merge pull request #83904 from ju1m/sanoid
sanoid: fix sanoid.conf generation
2021-06-30 23:55:26 +02:00
Dima
0a977cf125 nixos/duplicity: fix typo in subcommand
In https://github.com/NixOS/nixpkgs/pull/120622 cleanup options were
added, but `remove-all-inc-of-but-n-full` was misspelled and as such
was not functioning.
2021-06-27 09:40:35 +02:00
Julien Moutinho
b62a093a58 sanoid: fix sanoid.conf generation 2021-06-09 03:25:04 +02:00
Robert Hensing
81c8189a84 nixos/postgresqlBackup: Only replace backup when successful
Previously, a failed backup would always overwrite ${db}.sql.gz,
because the bash `>` redirect truncates the file; even if the
backup was going to fail.
On the next run, the ${db}.prev.sql.gz backup would be
overwritten by the bad ${db}.sql.gz.

Now, if the backup fails, the ${db}.in-progress.sql.gz is in an
unknown state, but ${db}.sql.gz will not be written.
On the next run, ${db}.prev.sql.gz (our only good backup) will
not be overwritten because ${db}.sql.gz does not exist.
2021-06-05 15:09:27 +02:00
talyz
59e0120aa5
treewide: Fix mysql alias deprecation breakage
62733b37b4 broke evaluation in all
places `pkgs.mysql` was used. Fix this by changing all occurrences to
`pkgs.mariadb`.
2021-06-04 21:42:08 +02:00
Robert Hensing
c586e42763 nixos/postgresqlBackup: Use PATH for readability 2021-06-04 17:49:53 +02:00
Domen Kožar
b72c2d3806
duplicati: 2.0.5.1 -> 2.0.6.1, fix nixos module 2021-05-28 10:33:53 +02:00
Sandro
7be85b5090
Merge pull request #104420 from danielfullmer/syncoid-perm-fix 2021-05-22 17:57:56 +02:00
Guillaume Girol
0d5fa1cff3
Merge pull request #120622 from symphorien/duplicity-master
nixos/duplicity: enable to prevent backup from growing infinitely
2021-05-20 19:00:59 +00:00
Guillaume Girol
41c7fa448f nixos/duplicity: add options to exercise all possible verbs
except restore ;)
2021-05-19 12:00:00 +00:00
Martin Weinelt
21746a7c80
nixos/postgresqlBackup: allow defining multiple times to start at
Or … none! Because forcing a string always results in an OnCalender=
setting, but an empty string leads to an empty value.

>  postgresqlBackup-hass.timer: Timer unit lacks value setting. Refusing.

or

> postgresqlBackup-miniflux.timer: Cannot add dependency job, ignoring: Unit postgresqlBackup-miniflux.timer has a bad unit file setting.

I require the postgresqlBackup in my borgbackup unit, so I don't
strictly need the timer and could previously set it to an empty list.
2021-05-14 20:41:08 +02:00
Guillaume Girol
e67e79642e nixos/duplicity: add options to not keep backups forever
Current module add backups forever, with no way to prune old ones.

Add an option to remove backups after n full backups or after some
amount of time.

Also run duplicity cleanup to clean unused files in case some previous
backup was improperly interrupted.
2021-04-25 20:34:38 +02:00
Guillaume Girol
166d5cc851 nixos/duplicity: format 2021-04-25 20:34:38 +02:00
Symphorien Gibol
7a87973b4c nixos/users: require one of users.users.name.{isSystemUser,isNormalUser}
As the only consequence of isSystemUser is that if the uid is null then
it's allocated below 500, if a user has uid = something below 500 then
we don't require isSystemUser to be set.

Motivation: https://github.com/NixOS/nixpkgs/issues/112647
2021-04-14 20:40:00 +02:00
Matt McHenry
13bee29b9b restic: allow prune without backup
fixes #97820
2021-03-21 18:47:52 -07:00
Léo Gaspard
4ee87cfead
Merge pull request #113620 from imlonghao/borgmatic
borgmatic: init at 1.5.12
2021-03-10 18:13:04 +01:00
imlonghao
c026da4056 borgmatic: init at 1.5.12 2021-03-04 13:01:03 +08:00
Cole Helbling
1b37f66fc1 nixos/zrepl: init
zrepl is a ZFS backup and replication tool written in Go.
2021-02-24 11:56:02 -08:00
Sandro
457ff6d28e
Merge pull request #111422 from helsinki-systems/mysqlBackup
nixos/mysqlBackup: add types
2021-02-01 12:39:53 +01:00
Fritz Otlinghaus
929bf6e678
nixos/postgresqlBackup: add types 2021-01-31 15:08:12 +01:00
Fritz Otlinghaus
b9d5ecf80b
nixos/mysqlBackup: add types 2021-01-31 15:06:50 +01:00
Elias Probst
27da11972d nixos/restic: correct location of cache directory
By default, restic determines the location of the cache based on the XDG
base dir specification, which is `~/.cache/restic` when the environment
variable `$XDG_CACHE_HOME` isn't set.
As restic is executed as root by default, this resulted in the cache being
written to `/root/.cache/restic`, which is not quite right for a system
service and also meant, multiple backup services would use the same cache
directory - potentially causing issues with locking, data corruption,
etc.

The goal was to ensure, restic uses the correct cache location for a
system service - one cache per backup specification, using `/var/cache`
as the base directory for it.

systemd sets the environment variable `$CACHE_DIRECTORY` once
`CacheDirectory=` is defined, but restic doesn't change its behavior
based on the presence of this environment variable.
Instead, the specifier [1] `%C` can be used to point restic explicitly
towards the correct cache location using the `--cache-dir` argument.

Furthermore, the `CacheDirectoryMode=` was set to `0700`, as the default
of `0755` is far too open in this case, as the cache might contain
sensitive data.

[1] https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers
2021-01-30 18:24:51 -08:00
Ben Siraphob
1c2a2b0a08 treewide: fold -> foldr 2021-01-26 10:57:07 +07:00
Fritz Otlinghaus
41f4784e65
bacula: add types 2021-01-25 19:00:01 +01:00
volth
bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Lorenzo Manacorda
b6356c6e2e modules/tarsnap: document timestamp format 2021-01-10 16:47:15 +02:00
Graham Christensen
bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Daniel Fullmer
d87903ac6b nixos/syncoid: fix permissions without --no-sync-snap
After 733acfa140, syncoid would fail to
run if commonArgs did not include [ "--no-sync-snap" ], since it would
not have permissions to create or destroy snapshots.
2020-11-21 17:47:36 -08:00
Benjamin Hipple
f98312fcb5
Merge pull request #79759 from lopsided98/syncoid-no-root
nixos/syncoid: automatically setup privilege delegation
2020-10-25 10:40:33 -04:00
Jan Tojnar
e6ce041cae
nixos/doc: Improve code listings
By adding prompts and replaceables and removing unnecessary indentation.
2020-09-23 01:25:25 +02:00
Maximilian Bosch
cac5339531
nixos/doc/borgbackup: correct install instructions for vorta
No need to fiddle around with `flatpack` to get `vorta`, a graphical
desktop-client for `borgbackup` running as it's available in `nixpkgs`.
2020-09-06 22:44:37 +02:00
rnhmjoj
20d491a317
treewide: completely remove types.loaOf 2020-09-02 00:42:50 +02:00
Jörg Thalheim
ba930d8679
nixos/modules: remove trailing whitespace
This leads to ci failure otherwise if the file gets changed.
git-blame can ignore whitespace changes.
2020-08-07 14:45:39 +01:00
Jörg Thalheim
1476c6f349
Merge pull request #91146 from tmplt/doc-zfs-replicate
nixos/zfs-replication: document expected lz4 on host system
2020-08-04 08:46:06 +01:00
Imran Hossain
7dd656a037 nixos/restic: Add options for rclone repositories 2020-07-06 10:27:55 -04:00
tmplt
a30294388c nixos/zfs-replication: document expected lz4 on host system 2020-06-24 19:41:36 +02:00
Silvan Mosberger
6440000547
Merge pull request #87599 from helsinki-systems/znapzend-oracle-mode 2020-05-12 15:39:25 +02:00
Michel Weitbrecht
90533bfde2
nixos/znapzend: Add oracleMode feature; add maintainer
The feature destroys snapshots one-by-one instead of all at once.
If many snapshots accumulated, destroying them all at once can fail
because the argument list is too long. See
https://github.com/oetiker/znapzend/blob/master/lib/ZnapZend/ZFS.pm#L284
2020-05-11 14:35:30 +02:00
Michel Weitbrecht
c46b26b9ad
nixos/znapzend: Use generic mbuffer path
The configured mbuffer path will be called on both the source and target
system. If you use pkgs.mbuffer from the source host and the target host
does not have this exact derivation, you will get a broken pipe when
sending snapshots. This is the case when transferring to a non-NixOS
system or to a host with a different mbuffer version.
2020-05-11 14:26:39 +02:00
Jörg Thalheim
ff0da3ad81
Merge pull request #83257 from rail/znapzend-0.20.0 2020-05-05 15:20:15 +01:00
Dominik Xaver Hörl
0412bde942 treewide: add bool type to enable options, or make use of mkEnableOption
Add missing type information to manually specified enable options or replace them by mkEnableOption where appropriate.
2020-04-21 08:55:36 +02:00
Silvan Mosberger
eb0148e90b
Merge pull request #84074 from Infinisil/fix-literal-option-examples
nixos/treewide: Fix incorrectly rendered examples
2020-04-03 15:41:53 +02:00
Jörg Thalheim
35359bb3e3
nixos/borgbackup: fix evaluation 2020-04-02 12:40:02 +01:00
Silvan Mosberger
1d0fc9729d
nixos/treewide: Fix incorrectly rendered examples
Many options define their example to be a Nix value without using
literalExample. This sometimes gets rendered incorrectly in the manual,
causing confusion like in https://github.com/NixOS/nixpkgs/issues/25516

This fixes it by using literalExample for such options. The list of
option to fix was determined with this expression:

  let
    nixos = import ./nixos { configuration = {}; };
    lib = import ./lib;
    valid = d: {
      # escapeNixIdentifier from https://github.com/NixOS/nixpkgs/pull/82461
      set = lib.all (n: lib.strings.escapeNixIdentifier n == n) (lib.attrNames d) && lib.all (v: valid v) (lib.attrValues d);
      list = lib.all (v: valid v) d;
    }.${builtins.typeOf d} or true;

    optionList = lib.optionAttrSetToDocList nixos.options;

  in map (opt: {
    file = lib.elemAt opt.declarations 0;
    loc = lib.options.showOption opt.loc;
  }) (lib.filter (opt: if opt ? example then ! valid opt.example else false) optionList)

which when evaluated will output all options that use a Nix identifier
that would need escaping as an attribute name.
2020-04-02 07:49:25 +02:00
Niklaus Giger
c027937d9a borgbackup: Moved documentation to NixOS manual and added examples for
* creating a local backup
* creating a borgbackup server
* backing up to a borgbackup server
* hints about the Vorta graphical desktop application
* Added documentation about Vorta desktop client

Tested the examples locally and with my borgbase.com account.
2020-04-01 22:21:10 +02:00
Rail Aliiev
ba7e3c6cba
Add new znapzend features to modules 2020-03-23 21:29:49 -04:00
Ben Wolsieffer
733acfa140 nixos/syncoid: automatically setup privilege delegation 2020-03-09 16:04:31 -04:00
Silvan Mosberger
637bb9fa98
Merge pull request #72060 from lopsided98/sanoid-init
sanoid: add package, NixOS module and test
2020-02-10 01:28:41 +01:00
Ben Wolsieffer
7684537e33
nixos/sanoid, nixos/syncoid: init module and test 2020-02-10 01:12:39 +01:00
Matt McHenry
5ad71cfe84
fix pruneCmd to use optionals so multi-element list is preserved 2020-02-07 10:25:33 +00:00
Jörg Thalheim
4fa2d4b5c3
nixos/restic: use optionalString/optionalAttrs where possible 2020-01-30 17:07:21 +00:00
Matt McHenry
1c9684abd6
restic: add dynamicFilesFrom 2020-01-30 17:00:10 +00:00
Matt McHenry
c6994e90dc
restic: add support for pruning 2020-01-30 16:59:34 +00:00
rnhmjoj
1d61efb7f1 treewide: use attrs instead of list for types.loaOf options 2020-01-06 10:39:18 -05:00
Yorick van Pelt
470c8a2a36 nixos/borgbackup: install job wrappers to systemPackages for easy borg access
Currently to run borg job manually, you have to use systemctl:
```
$ systemctl start borgbackup-job-jobname.service
```

This commit makes wrappers around borg jobs available in $PATH, which have
BORG_REPO and connection args set correctly:
```
$ borg-job-jobname list
$ borg-job-jobname mount ::jobname-archive-2019-12-25T00:01:29 /mnt/some-path
$ borg-job-jobname create ::test /some/path
```

Closes: https://github.com/NixOS/nixpkgs/pull/64888
Co-authored-by: Danylo Hlynskyi <abcz2.uprola@gmail.com>
2019-12-26 07:50:03 +02:00
Christian Kampka
2387deec3d
postgresql-backup: Use saner defaults for pg_dump 2019-12-15 13:14:21 +01:00
wucke13
93696e3c1f nixos/bacula-sd: add autochange support
+ Fixing interrupted descriptions
+ Added more verbose descriptions
+ Addded <literal> to the descriptions
+ uniformly reformated descriptions to break at 80 chars

(cherry picked from commit c7945c8a97df52a468cf32155154cdec021561bc)
2019-12-11 19:16:50 +01:00
Silvan Mosberger
4ee3e8b21d
nixos/treewide: Move rename.nix imports to their respective modules
A centralized list for these renames is not good because:
- It breaks disabledModules for modules that have a rename defined
- Adding/removing renames for a module means having to find them in the
central file
- Merge conflicts due to multiple people editing the central file
2019-12-10 02:51:19 +01:00
Silvan Mosberger
dd0a47e7ae
treewide: Switch to system users (#71055)
treewide: Switch to system users
2019-11-01 13:26:43 +01:00
Silvan Mosberger
f124b7addc
nixos/znapzend: Increase starting timeout 2019-10-27 12:29:31 +01:00
Silvan Mosberger
698dfed2e6
nixos/znapzend: Add options for features 2019-10-27 12:06:18 +01:00
Maximilian Bosch
2dfc67517a
nixos/borgbackup: add option to allow removable devices
When having backup jobs that persist to a removable device like an
external HDD, the directory shouldn't be created by an activation script
as this might confuse auto-mounting tools such as udiskie(8).

In this case the job will simply fail, with the former approach
udiskie ran into some issues as the path `/run/media/ma27/backup` was
already there and owned by root.
2019-10-14 17:28:44 +02:00
Janne Heß
d6c08776ba treewide: Switch to system users 2019-10-12 22:25:28 +02:00
Notkea
981177e4dd nixos/postgresql-wal-receiver: remove restart limit (#67857)
useful in case of network disruption
2019-09-23 22:51:26 +03:00
Vladimír Čunát
f21211ebfe
Merge branch 'master' into staging 2019-09-02 23:25:24 +02:00
Aaron Andersen
3ee1adcf6e
Merge pull request #67818 from xvapx/remove/crashplan
Remove/crashplan
2019-08-31 21:47:27 -04:00
Marti Serra
d3de35967a crashplan, crashplan-small-business: remove pkg and module 2019-09-01 03:25:19 +02:00
Silvan Mosberger
478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Aaron Andersen
6f6468bef3
Merge pull request #65728 from Infinisil/types-eithers
lib/types: Add oneOf, extension of either to a list of types
2019-08-13 11:48:42 -04:00
Notkea
4ff9a48398 nixos/postgresql-wal-receiver: add module (#63799) 2019-08-11 20:09:42 +03:00
Silvan Mosberger
88bb9fa403
nixos/modules: Replace all nested types.either's with types.oneOf's 2019-08-08 23:35:52 +02:00
Alex Brandt
bdd7b5a3ab nixos/zfs: add autoReplication functionality
This adds a simple configuration for sending snapshots to a remote
system using zfs-replicate that ties into the autoSnapshot settings
already present in services.zfs.autoSnapshot.
2019-08-02 08:04:21 -07:00
Yarny0
d99462ff5a nixos/backup/tsm: init module
Based on the programs/tsm-client module,
this commit introduces a systemd service that uses the
tsm-client to create regular backups of the machine.
2019-07-15 09:41:37 +02:00
Domen Kožar
2072043efb
duplicati: fix StateDirectory 2019-06-27 14:15:37 +02:00
Domen Kožar
f572d4eb91
duplicati: PermissionsStartOnly is deprecated 2019-06-26 15:52:00 +02:00
Domen Kožar
e8916cc6af
duplicati: allow changing the user 2019-06-25 14:28:03 +02:00
Domen Kožar
c687da8940
duplicati: change default interface to 127.0.0.1 for a saner default
Existing 'lo' didn't work for me as it was failing to assign an IP.
2019-06-22 20:26:18 +02:00
Robin Gloster
6cf583cf2f
Merge pull request #60406 from JohnAZoidberg/remove-isnull
treewide: Remove usage of isNull
2019-05-18 09:36:24 +00:00
Eelco Dolstra
de9e238469
FIx some malformed XML in option descriptions
E.g. these were using "<para>" at the *end* of a description. The real
WTF is that this is possible at all...
2019-05-13 09:15:17 +02:00
Silvan Mosberger
a3e84ba63a
Merge pull request #55771 from Infinisil/nixos/znapzend/parallel
nixos/znapzend: Run znapzendzetup import in parallel
2019-05-02 18:22:44 +02:00
Daniel Schaefer
786f02f7a4 treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-04-29 14:05:50 +02:00
Aaron Andersen
c3f69d1373
Merge pull request #59381 from aanderse/automysqlbackup
automysqlinit: init at 3.0_rc6
2019-04-22 08:30:23 -04:00
Aaron Andersen
5f4df8e509 automysqlinit: init at 3.0_rc6 2019-04-15 21:51:55 -04:00
Aaron Andersen
0672f867bc nixos/mysql-backup: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
2019-04-13 07:01:00 -04:00
Aaron Andersen
7b2be9b328 nixos/postgresqlBackup: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
2019-04-13 07:00:57 -04:00
Bob van der Linden
66fb3aa1be nixos/bacula: /var/run -> /run 2019-03-20 00:01:45 +01:00
Silvan Mosberger
cf2f5850e2
nixos/znapzend: Run znapzendzetup import in parallel
Patch by @Baughn, who noticed these imports being very slow when run
serially with many datasets, so much that the service would time out and
fail, this fixes it.
2019-02-14 18:33:59 +01:00
Olivier Marty
7a878660a7 nixos/duplicity: init
Add a simple module that wrap duplicity in a systemd service.
2019-02-03 19:13:01 +01:00
Silvan Mosberger
968eb6b3e0
Merge pull request #54514 from LeOtaku/fix/restic-timer-config
nixos/restic: change type of timerConfig option
2019-01-24 00:40:52 +01:00
LeOtaku
63ed962e4b nixos/restic: change type of timerConfig option to attrsOf unitOption
This is needed for correctly passing the option to "systemd.timer"
2019-01-23 21:29:02 +01:00
Jörg Thalheim
1af4f366ca
nixos/postgresqlBackup: add backupAll option
For large setups it is useful to list all databases explicit
(for example if temporary databases are also present) and store them in extra
files.
For smaller setups it is more convenient to just backup all databases at once,
because it is easy to forget to update configuration when adding/renaming
databases. pg_dumpall also has the advantage that it backups users/passwords.

As a result the module becomes easier to use because it is sufficient
in the default case to just set one option (services.postgresqlBackup.enable).
2019-01-19 11:41:06 +00:00
Yorick
4d68e82dbc nixos/borgbackup: use coercedTo instead of apply on paths (#53756)
so multiple declarations merge properly
2019-01-10 16:34:02 +01:00
Robert Schütz
74e283403c
nixos/borgbackup: allow paths to be empty or relative (#51275)
This former necessary in order to exclusively use `--pattern` or `--patterns-from`.
Fixes #51267.
2018-11-30 17:37:50 +01:00
Samuel Dionne-Riel
58c0c2574c
Merge pull request #49840 from markuskowa/fix-pgBackup
nixos/postgresqlBackup: set to umask to 0077
2018-11-14 01:40:38 +00:00
Silvan Mosberger
38b2520b96
Merge pull request #37365 from proteansec/pkgs/bacula
bacula: 5.2.13 -> 9.2.1
2018-11-10 04:23:28 +01:00
Markus Kowalewski
a0371d4761
nixos/postgresqlBackup: set to umask to 0077
* Ensure that the backup file is only readable by the owner
* Add file permission test to tests
2018-11-06 21:59:29 +01:00
Dejan Lukan
02a3726a12 bacula: 5.2.13 -> 9.2.1 2018-11-01 21:28:16 +01:00
Matthew Bauer
eb1afe452a
Merge pull request #44332 from jerith666/restic-s3-default
restic: add missing default for s3CredentialsFile
2018-08-01 22:56:12 -04:00
Matt McHenry
016922f88b restic: add missing default for s3CredentialsFile 2018-08-01 22:53:14 -04:00
volth
2e979e8ceb [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
volth
87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
Florian Klink
fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Matthew Bauer
dfd90df391
Merge pull request #41343 from jerith666/restic-s3
restic: add s3CredentialsFile option
2018-06-28 20:43:41 -04:00
Jörg Thalheim
d63cb0695f
Merge pull request #42133 from markuskowa/pgbackup
nixos/pgbackup: Fix and refactor the postgres backup module
2018-06-20 22:21:52 +01:00
Markus Kowalewski
6dc06fdd28
nixos/pgbackup: rename option period -> startAt 2018-06-20 17:58:48 +02:00
Markus Kowalewski
baef643232
nixos/pgbackup: Fix the postgres backup modules 2018-06-17 19:48:51 +02:00
nyanloutre
20f6c5c865
nixos/duplicati: add port and interface options 2018-06-09 00:34:13 +02:00
Matt McHenry
c61aad6574 restic: add s3CredentialsFile option 2018-06-02 14:12:23 -04:00
Robert Schütz
3c0daa19e2 nixos/borgbackup: make extraArgs a shell variable
in line with the other extra*Args variables
2018-05-24 13:53:25 +02:00
Simon Lackerbauer
1433ec60af
nixos/borgbackup: let borg write to disk and see /tmp, add extraArgs 2018-05-24 04:40:45 +02:00
Pascal Bach
7f53ee8412 restic-rest-server module: init 2018-05-04 16:55:06 +02:00
Lassulus
6db2057f00 nixos/restic: init (#38948) 2018-04-21 11:12:43 +01:00
nyanloutre
b3aa9ecdf8
duplicati: create service 2018-04-07 21:23:04 +02:00
Michishige Kaito
c515f7036e Address @yegortimoshenko review 2018-03-27 16:35:54 +01:00
Michishige Kaito
bde525aaaf Add restore service for tarsnap archives
This service will never run automatically, but it encapsulates the
necessary logic and configuration to run a restore of the latest
archive, and allows to hook more specific logic, such as loading
a database dump, via `postStart`.
2018-03-27 01:19:02 +01:00
Michishige Kaito
d462595600 Add support for tarsnap options -H and -L
A new option `explicitSymlinks` will set `-H` when creating an archive.
This option makes tarsnap follow any symlinks specified explicitly on
the commandline, but not any found inside the file tree.

A new option `followSymlinks` will set `-L` when creating an archive.
This option makes tarsnap follow any symlinks found anywhere in the file
tree instead of storing them as-is.
2018-03-27 01:19:02 +01:00
Guillaume Maudoux
c948613a65 almir: also remove the corresponding module.
The almir package was removed in 30291227f2 at about 2017-08
This module can no more be used without it.
2018-03-25 21:41:19 +01:00
Michael Raskin
296dca019b
Merge pull request #35073 from Infinisil/fix/znapzend
nixos/znapzend: fix when no previous zetup
2018-03-25 17:29:08 +00:00
Robert Schütz
fdf0f037be nixos/borgbackup: init 2018-03-19 13:12:47 +01:00
Marti Serra
30f27c49b9 crashplan-small-business: remove unneeded function 2018-02-21 09:25:58 +01:00
Joachim F
b30fae01cd
Merge pull request #32761 from xvapx/crashplan-small-business
crashplan-small-business: init at 6.6.0
2018-02-20 19:19:22 +00:00
Silvan Mosberger
c2b8d14b56
nixos/znapzend: fix when no previous zetup
When the znapzend module was enabled for the first time with pure =
true; then the list of previous entries is empty, but xargs still tried
to execute a znapzendzetup delete command with no arguments, which made
it fail
2018-02-17 15:50:48 +01:00
Silvan Mosberger
66fefb82e7
nixos/znapzend: stateless setup
This enables znapzend users to specify its full configuration through
NixOS options, without ever needing to use the stateful `znapzendzetup`
command.

This works by running znapzendzetup with the specified config in
ExecPre, just before the znapzend daemon is started.

There is also the `pure` option which will clear all previous znapzend setups,
making it as stateless as can get, as only the setup declared in
configuration.nix will be persisted.
2017-12-28 01:40:01 +01:00
Yurii Rashkovskii
26a59f70a2 nixos/tarsnap: update doc for printStats
after the change made in 15567e6d8e
2017-12-20 10:16:10 +00:00
Marti Serra
f24b642587 crashplan-small-business: init at 6.6.0 2017-12-18 07:20:18 +01:00
Rodney Lorrimar
56eba66f77 mysqlBackup service: let it work with default settings
* Grants enough privileges to the configured user so that it can run
  mysqldump.

* Adds a nixos test.

* Use systemd timers instead of a cronjob (by @fadenb).

* Creates a new user for backups by default, instead of using mysql
  user.

* Ensures that backup user has write permissions on backup location.

* Write backup to a temporary file before renaming so that a failed
  backup won't overwrite the previous backup, and so that the backup
  location will never contain a partial backup.

Breaking changes:

 * Renamed period to calendar to reflect the change in how to
   configure the backup time.

 * A failed backup will no longer result in cron sending an e-mail --
   users' monitoring systems must be updated.

Resolves #24728
2017-09-27 18:44:49 +02:00
Silvan Mosberger
76dec4a4d2 znapzend service: add autoCreation option 2017-08-30 14:13:13 +02:00
Silvan Mosberger
3497ba5c3a
znapzend service: options for logging/nodestroy/restart on failure
fixes #25960
2017-05-22 21:47:51 +01:00
Robin Stumm
72e50645a3 znapzend service: fix autostart 2017-05-15 15:09:50 +02:00
Renzo Carbonara
9a5916dc47 tarsnap service: add 'verbose' config option (#25353) 2017-05-01 16:09:45 +01:00
Jörg Thalheim
8174b447a2 znapsend: do not spawn a shell in the service 2017-04-19 13:56:51 +02:00
Robin Stumm
725b84be18 znapzend service: fix reload 2017-04-19 01:05:55 +02:00
Robin Gloster
a79891f6b2
sitecopy: remove 2017-03-30 12:06:09 +02:00
Franz Pletz
9536169074
nixos/treewide: remove boolean examples for options
They contain no useful information and increase the length of the
autogenerated options documentation.

See discussion in #18816.
2017-03-17 23:36:19 +01:00
Nikolay Amiantov
15567e6d8e tarsnap service: fix multiple simultaneous archives with a single key 2016-11-20 19:15:52 +03:00
Matt McHenry
ee6dfa1e9e crashplan: 4.7.0r2 -> 4.8.0r1 2016-11-13 14:38:14 -05:00
Emery Hemingway
b675619391 nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
Joachim F
7e80c42b0e Merge pull request #18511 from ericsagnes/feat/remove-optionSet
modules: optionSet -> submodule
2016-10-01 17:57:45 +02:00
Damien Cassou
76923385bc
rsnapshot: add default options to module config 2016-09-22 15:04:46 +02:00
Eric Sagnes
09a3ea1abf bacula module: optionSet -> submodule 2016-09-13 12:53:09 +09:00
Svein Ove Aas
ed83a0ec8b crashplan: Wait for filesystems to be mounted before starting 2016-08-14 11:56:21 +02:00
Alexei Robyn
1e2ec5817c rsnapshot module: Enable manual rsnapshot usage with module config. 2016-05-12 09:27:59 +10:00
Alexei Robyn
c90d5eb298 rsnapshot module: Avoid package rebuild, pass config file explicitly. 2016-05-12 09:27:52 +10:00
Arseniy Seroka
fd5ed06b0d Merge pull request #14977 from jerith666/crashplan-46-r3
Crashplan: 4.6.0-r2 -> 4.6.0-r3
2016-04-25 20:38:42 +03:00
Matt McHenry
8262d7bdd4 crashplan: always overwrite binaries in /var/lib/ to ensure that updates are applied fully 2016-04-25 12:11:50 -04:00
joachifm
687d21e4fd Merge pull request #14405 from jerith666/crashplan-46-r2
Crashplan 46 r2
2016-04-02 22:06:40 +00:00
Matt McHenry
213a8a1e96 crashplan: fix vardir file existence check 2016-04-02 16:43:12 -04:00
Arseniy Seroka
2358582976 Merge pull request #14045 from otwieracz/master
znapzend: added
2016-03-24 23:10:40 +03:00
Slawomir Gonet
3ff417cbb7 znapzend service: init at 0.15.3 2016-03-24 20:57:33 +01:00
Matt McHenry
447c97f929 crashplan: 3.6.4 -> 4.6.0
* the major change is to set TARGETDIR=${vardir}, and symlink from
  ${vardir} back to ${out} instead of the other way around.  this
  gives CP more liberty to write to more directories -- in particular
  it seems to want to write some configuration files outside of conf?

* run.conf does not need 'export'

* minor tweaks to CrashPlanDesktop.patch
2016-03-20 13:56:54 -04:00
Tanner Doshier
ab1008014d tarsnap: 1.0.36.1 -> 1.0.37 2016-03-14 17:56:48 -05:00
Thomas Strobel
a04a7272aa Add missing 'type', 'defaultText' and 'literalExample' in module definitions
- add missing types in module definitions
- add missing 'defaultText' in module definitions
- wrap example with 'literalExample' where necessary in module definitions
2016-01-17 19:41:23 +01:00
Austin Seipp
7a01badef5 nixos: tarsnap - allow keys for individual archives
Two concurrent tarsnap backups cannot be run at the same time with the
same keys - completely separate sets of keys must be generated for each
archive in this case, if you want backups to overlap.

This extends the archives attrset to support a 'keyfile' option, which
defaults to /root/tarsnap.key like the top-level attribute.

With this change, if you generate two keys with tarsnap-keygen(1) and
use each of those separately for each archive, you can backup
concurrently.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2016-01-07 05:54:41 -06:00
Austin Seipp
ec70f64ecd nixos: tarsnap - separate archive cachedirs
Tarsnap locks the cachedir during backup, meaning if you specify
multiple backups with a shared cache that might overlap (for example,
one backup may take an hour), secondary backups will fail. This isn't
very nice behavior for the obvious reasons.

This splits the cache dirs for each archive appropriately. Note that
this will require a rebuild of your archive caches (although if you were
only using one archive for your whole system, you can just move the
directory).

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2016-01-07 05:54:36 -06:00
Tanner Doshier
ad796f155b nixos: tarsnap - make systemd timer persistent
A machine may not always be active (or online!) when a backup timer
triggers, meaning backups can be missed - now we properly set the
tarsnap timer's Persistent option so systemd will run the command even
when the machine wasn't online at that exact time.

However, we also need to make sure that we can contact the tarsnap
server reliably before we start the backup. So, we attempt to ping the
access endpoint in a loop with a sleep, before continuing.

This fixes #8823.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2016-01-07 05:52:18 -06:00
Austin Seipp
472a5192fd Revert "nixos: tarsnap - separate archive cachedirs"
This reverts commit 5f0253ace6.

I didn't intend to push this - I meant to push it to *my fork's*
remote...
2016-01-07 04:51:58 -06:00
Austin Seipp
5f0253ace6 nixos: tarsnap - separate archive cachedirs
Tarsnap locks the cachedir during backup, meaning if you specify
multiple backups with a shared cache that might overlap (for example,
one backup may take an hour), secondary backups will fail. This isn't
very nice behavior for the obvious reasons.

This splits the cache dirs for each archive appropriately. Note that
this will require a rebuild of your archive caches (although if you were
only using one archive for your whole system, you can just move the
directory).

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2016-01-07 04:26:57 -06:00
Tobias Geerinckx-Rice
5d8f61a660 nixos: sitecopy service: re-format descriptions 2015-09-07 01:25:54 +02:00
Tobias Geerinckx-Rice
18851071e6 nixos: bacula service: re-format descriptions 2015-09-07 01:12:26 +02:00
Eelco Dolstra
19ffa212af types.uniq types.int -> types.int
types.int already implies uniqueness.
2015-06-15 18:11:32 +02:00
Nikolay Amiantov
3e35ea305f postgresql-backup: cleanup 2015-05-19 18:35:22 +03:00
Nikolay Amiantov
e9679ce32a postgresql-backup: use system postgresql package 2015-05-13 16:06:50 +03:00
Aristid Breitkreuz
5ccbfb2dcc tarsnap: fix up permissions of existing cache directories 2015-05-04 18:58:35 +00:00
Joachim Fasting
66bfc3bbe6 tarsnap module: add options for controlling bandwidth
Annoyingly, these do not appear to accept SI prefixes.
2015-04-04 12:03:02 +02:00
Joachim Fasting
7cb7c57132 tarsnap module: inline optionalNullStr 2015-04-04 11:34:37 +02:00
Joachim Fasting
1bdd12ed69 nixos: refactor tarsnap backup service module
Major changes
- Port to systemd timers: for each archive configuration is created a
  tarsnap@archive-name.timer which triggers the instanced service unit
- Rename the `config` option to `archives`

Minor/superficial improvements
- Restrict tarsnap service capabilities
- Use dirOf builtin
- Set executable bit for owner of tarsnap cache directory
- Set IOSchedulingClass to idle
- Humanize numbers when printing stats
- Rewrite most option descriptions
- Simplify assertion
2015-03-10 12:35:58 +01:00
Cillian de Róiste
1d5aecd356 Almir module: set a working default sqlalchemy_engine_url 2014-11-30 13:11:55 +01:00
Igor Pashev
2b91426920 Use lib instead of pkgs.lib
Usage of pkgs.lib may cause infinite recursion
2014-11-17 20:30:37 +03:00
Michael Raskin
6d0518fbdf Merge pull request #4282 from sztupi/crashplan
Crashplan

OK, it is an external service with unfree client, so let's declare that ensuring usability of the service is not our headache.
2014-11-09 18:09:33 +03:00
Aristid Breitkreuz
93f2c180d0 rsnapshot: add git version & make it configurable in the nixos module 2014-10-27 20:38:39 +01:00
Attila Sztupak
90a326eecd crashplan: nixos module for backup service 2014-09-26 15:33:36 +01:00
aszlig
8a56a55bb4
nixos/manual: Use literalExample when feasible.
Should bring most of the examples into a better consistency regarding
syntactic representation in the manual.

Thanks to @devhell for reporting.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-08-27 23:41:15 +02:00
Shea Levy
b3cfb9084b Get all lib functions from lib, not pkgs.lib, in modules 2014-07-02 12:28:18 -04:00
Austin Seipp
9242ed1fe2 nixos: refactor tarsnap module
The Tarsnap module is now far more flexible, allowing individual
archives with individual options to be specified at will, allowing
granular backup schedules, etc.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-04-28 18:15:16 -05:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Domen Kožar
917498001f almir: correctly set PYTHONPATH 2014-03-21 18:02:15 +01:00
Austin Seipp
881bb235d9 nixos: tarsnap module documentation updates
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-03-08 08:00:56 -06:00
Domen Kozar
10787951ab tarsnap: mention getting started page 2014-03-07 15:37:09 +01:00
Austin Seipp
24cf6afa05 nixos: add Tarsnap backup service module
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-03-07 15:37:09 +01:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00