Skip to content

nixos/pgbackup: Fix and refactor the postgres backup module#42133

Merged
Mic92 merged 3 commits intoNixOS:masterfrom
markuskowa:pgbackup
Jun 20, 2018
Merged

nixos/pgbackup: Fix and refactor the postgres backup module#42133
Mic92 merged 3 commits intoNixOS:masterfrom
markuskowa:pgbackup

Conversation

@markuskowa
Copy link
Member

Motivation for this change

Fix the postgresqlBackup module. At least in NixOS 18.03 the backup is broken, delivering empty backup files quietly (#41388).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 17, 2018
@Mic92
Copy link
Member

Mic92 commented Jun 19, 2018

@GrahamcOfBorg test postgresql

@GrahamcOfBorg
Copy link

Success on aarch64-linux

Attempted: tests.postgresql

No partial log is available.

@GrahamcOfBorg
Copy link

Success on x86_64-linux

Attempted: tests.postgresql

No partial log is available.


period = mkOption {
default = "15 01 * * *";
default = "*-*-* 01:15:00";
Copy link
Member

@Mic92 Mic92 Jun 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should rename this option? The type of both is string old values could break silently. Renaming the option would make this more obvious since the format is different.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startAt could be alternative.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that seems more natural in the new version

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding:

(mkRemovedOptionModule [ "services" "postgresqlBackup" "period" ] "A systemd timer is now used instead of cron. The starting time can be configured via services.postgresqlBackup.startAt")

modules/rename.nix would make sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Do we need to also mention the change in the release notes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, the error message generated from mkRemovedOptionModule should be self-explanatory.

@Mic92 Mic92 merged commit d63cb06 into NixOS:master Jun 20, 2018
@markuskowa markuskowa deleted the pgbackup branch June 20, 2018 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants