massicot: switch to ssd
This commit is contained in:
parent
74fe93e5d8
commit
4822043a8b
3 changed files with 41 additions and 17 deletions
|
@ -5,9 +5,9 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
sqliteBackup = path: ''
|
||||
mkdir -p /backup${path}
|
||||
${lib.getExe pkgs.sqlite} ${path} "vacuum into '/var/backup${path}'"
|
||||
sqliteBackup = fromPath: toPath: file: ''
|
||||
mkdir -p ${toPath}
|
||||
${lib.getExe pkgs.sqlite} ${fromPath} ".backup '${toPath}/${file}'"
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ in
|
|||
repositoryFile = config.sops.secrets."restic/repo".path;
|
||||
passwordFile = config.sops.secrets."restic/password".path;
|
||||
paths = [
|
||||
"/var/backup"
|
||||
"/backup"
|
||||
"/mnt/storage"
|
||||
];
|
||||
};
|
||||
|
@ -34,15 +34,15 @@ in
|
|||
enable = true;
|
||||
compression = "zstd";
|
||||
compressionLevel = 9;
|
||||
location = "/var/backup/postgresql";
|
||||
location = "/backup/postgresql";
|
||||
};
|
||||
|
||||
services.restic.backups.${config.networking.hostName} = {
|
||||
backupPrepareCommand = builtins.concatStringsSep "\n" [
|
||||
(sqliteBackup "/var/lib/hedgedoc/db.sqlite")
|
||||
(sqliteBackup "/var/lib/bitwarden_rs/db.sqlite3")
|
||||
(sqliteBackup "/var/lib/gotosocial/database.sqlite")
|
||||
(sqliteBackup "/var/lib/kanidm/kanidm.db")
|
||||
(sqliteBackup "/var/lib/hedgedoc/db.sqlite" "/backup/hedgedoc" "db.sqlite")
|
||||
(sqliteBackup "/var/lib/bitwarden_rs/db.sqlite3" "/backup/bitwarden_rs" "db.sqlite3")
|
||||
(sqliteBackup "/var/lib/gotosocial/database.sqlite" "/backup/gotosocial" "database.sqlite")
|
||||
(sqliteBackup "/var/lib/kanidm/kanidm.db" "/backup/kanidm" "kanidm.db")
|
||||
];
|
||||
extraBackupArgs = [
|
||||
"--limit-upload=1024"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue