backup module #92

Merged
kalipso merged 9 commits from sanoid into master 2025-03-16 13:13:56 +01:00
Owner

this should allow us to

  • define list of datasets that should be automatically snapshotted (for example storage/encrypted on fanny)
  • define hosts and their datasets that should be backed up
    • this would be defined on our offsite machines
    • connection will be automatically established through malovpn
    • offsite machines will pull backups using backup user

Example configuration on fanny could look like this:

malobeo.backup = {
  enable = true;
  snapshots = [ "storage/encrypted" "zroot/encrypted/var" ];
};

Configuration on offsite machine (assuming it has a pool called backuppool) could look like this:

malobeo.backup = {
  enable = true;
  hosts.fanny = [
    {
      sourceDataset = "storage/encrypted";
      targetDataset = "backuppool/fanny/encrypted"; 
    }
    {
      sourceDataset = "zroot/encrypted/var";
      targetDataset = "backuppool/fanny/var"; 
    }
  ];
};
this should allow us to - define list of datasets that should be automatically snapshotted (for example `storage/encrypted` on fanny) - define hosts and their datasets that should be backed up - this would be defined on our offsite machines - connection will be automatically established through malovpn - offsite machines will pull backups using `backup` user Example configuration on fanny could look like this: ``` nix malobeo.backup = { enable = true; snapshots = [ "storage/encrypted" "zroot/encrypted/var" ]; }; ``` Configuration on offsite machine (assuming it has a pool called backuppool) could look like this: ``` nix malobeo.backup = { enable = true; hosts.fanny = [ { sourceDataset = "storage/encrypted"; targetDataset = "backuppool/fanny/encrypted"; } { sourceDataset = "zroot/encrypted/var"; targetDataset = "backuppool/fanny/var"; } ]; }; ```
kalipso added 2 commits 2025-03-16 01:15:47 +01:00
this way we can easily use ip by hostname in other modules
[backup] WIP setup sanoid/syncoid module
All checks were successful
Check flake syntax / flake-check (push) Successful in 6m5s
286e03c853
kalipso changed title from WIP backup module to WIP: backup module 2025-03-16 09:28:16 +01:00
kalipso added 1 commit 2025-03-16 10:11:25 +01:00
[backup] fix errors
All checks were successful
Check flake syntax / flake-check (push) Successful in 5m44s
d5e94b50cb
kalipso changed title from WIP: backup module to backup module 2025-03-16 10:11:46 +01:00
kalipso added 2 commits 2025-03-16 10:19:16 +01:00
[fanny] enable automatic snapshots
Some checks failed
Check flake syntax / flake-check (push) Failing after 3m0s
91d86c49a1
Author
Owner

This would solve #38 for now. In future we could still think about restic backups for each individual microvm.

This would solve #38 for now. In future we could still think about restic backups for each individual microvm.
kalipso added 1 commit 2025-03-16 10:24:55 +01:00
[users] fix typo
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m13s
70ec63f213
kalipso added 1 commit 2025-03-16 11:16:15 +01:00
[backup] update module descriptions
Some checks failed
Check flake syntax / flake-check (push) Failing after 2m16s
3021716640
kalipso requested review from ahtlon 2025-03-16 11:24:05 +01:00
kalipso added 1 commit 2025-03-16 11:25:53 +01:00
[backup] fix typo
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m12s
026494c877
ahtlon approved these changes 2025-03-16 12:24:24 +01:00
ahtlon left a comment
Collaborator

Looks good to me!

Looks good to me!
@@ -0,0 +20,4 @@
enable = mkOption {
type = types.bool;
default = false;
description = "Enable sharing metrics";
Collaborator

"Enable sharing metrics"?

"Enable sharing metrics"?
kalipso marked this conversation as resolved
kalipso added 1 commit 2025-03-16 12:54:08 +01:00
[backup] fix description
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m13s
be0bb0b08b
kalipso merged commit d73031e7f1 into master 2025-03-16 13:13:56 +01:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kalipso/infrastructure#92