Commit graph

166 commits

Author SHA1 Message Date
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