key the file saved and add it to hosts that need backup
This commit is contained in:
parent
36d1d1c61e
commit
123b167ef5
|
@ -1,4 +1,4 @@
|
|||
{ profiles, suites, ... }:
|
||||
{ self, profiles, suites, ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
|
@ -13,6 +13,8 @@
|
|||
services."grasp".path = "/home/anish/kitaab/grasp";
|
||||
services."grasp".user = "anish";
|
||||
|
||||
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = [ "wallabag" ];
|
||||
|
|
|
@ -22,7 +22,7 @@ in
|
|||
'';
|
||||
};
|
||||
paths = lib.mkOption {
|
||||
type = with types; attrsOf (listOf str);
|
||||
type = with types; listOf str;
|
||||
default = { };
|
||||
example = literalExample ''
|
||||
[ "/home/anish/usr" ];
|
||||
|
@ -46,7 +46,7 @@ in
|
|||
};
|
||||
environment = { BORG_RSH = "ssh -i /root/borg/borg-key"; }; # YOU NEED TO PUT THIS HERE MANUALLY
|
||||
compression = "auto,lzma";
|
||||
startAt = "weekly";
|
||||
startAt = "daily";
|
||||
extraArgs = "--remote-path=borg1";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,34 +1 @@
|
|||
{
|
||||
# Assumes the remote borg backup server has already been initialized
|
||||
# borg init --encryption-key=repokey-blake2 -rsh 'ssh -i /run/keys/id_ed25519_borgbase' 20779@hk-s020.rsync.net:<borg-archive>
|
||||
services.borgbackup.jobs = {
|
||||
backupTaskwarriorRsync = {
|
||||
paths = [ "/var/lib/taskserver" ];
|
||||
doInit = true;
|
||||
repo = "20779@hk-s020.rsync.net:taskwarrior";
|
||||
encryption = {
|
||||
mode = "repokey-blake2";
|
||||
passCommand = "cat /run/keys/rsync";
|
||||
};
|
||||
environment = { BORG_RSH = "ssh -i /run/keys/id_ed25519_borgbase"; };
|
||||
compression = "auto,lzma";
|
||||
startAt = "weekly";
|
||||
extraArgs = "--remote-path=borg1";
|
||||
};
|
||||
};
|
||||
services.borgbackup.jobs = {
|
||||
backupShaarliRsync = {
|
||||
paths = [ "/var/www/shaarli-config/data/datastore.php" "/var/www/shaarli-config/config" "/var/www/shaarli-config/.json.config" ];
|
||||
doInit = true;
|
||||
repo = "20779@hk-s020.rsync.net:shaarli";
|
||||
encryption = {
|
||||
mode = "repokey-blake2";
|
||||
passCommand = "cat /run/keys/rsync";
|
||||
};
|
||||
environment = { BORG_RSH = "ssh -i /run/keys/id_ed25519_borgbase"; };
|
||||
compression = "auto,lzma";
|
||||
startAt = "weekly";
|
||||
extraArgs = "--remote-path=borg1";
|
||||
};
|
||||
};
|
||||
}
|
||||
{ }
|
||||
|
|
Loading…
Reference in a new issue