2024-03-09 22:18:26 +00:00
|
|
|
{self, ...}: let
|
|
|
|
backupSchedules = import "${self}/data/backupSchedules.nix";
|
|
|
|
in {
|
2023-09-18 03:56:58 +01:00
|
|
|
services.rclone-sync = {
|
2022-11-15 14:52:49 +00:00
|
|
|
enable = true;
|
|
|
|
user = "storage";
|
2023-09-18 03:56:58 +01:00
|
|
|
syncJobs = map (syncJob:
|
|
|
|
syncJob
|
|
|
|
// {
|
2024-03-09 22:18:26 +00:00
|
|
|
timerConfig = backupSchedules.remoteBackups;
|
2023-09-18 03:56:58 +01:00
|
|
|
extraArgs = [
|
|
|
|
"--fast-list"
|
2023-10-02 03:08:24 +01:00
|
|
|
"--check-first"
|
2023-09-28 14:04:35 +01:00
|
|
|
"--delete-before"
|
|
|
|
"--b2-upload-concurrency=4"
|
|
|
|
"--transfers=4"
|
|
|
|
"--bwlimit 80M"
|
2023-09-18 03:56:58 +01:00
|
|
|
];
|
|
|
|
}) [
|
2022-11-15 14:52:49 +00:00
|
|
|
# Pheonix System's B2
|
|
|
|
{
|
2024-07-06 17:20:28 +01:00
|
|
|
source = "Storage:Backups";
|
|
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Phoenix-Cryptidz-Storage/Backups";
|
2023-03-19 11:44:27 +00:00
|
|
|
id = "phoenix_b2_backups";
|
2022-11-15 14:52:49 +00:00
|
|
|
}
|
|
|
|
{
|
2024-07-06 17:20:28 +01:00
|
|
|
source = "Storage:Photos";
|
|
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Phoenix-Cryptidz-Storage/Photos";
|
2023-03-19 11:44:27 +00:00
|
|
|
id = "phoenix_b2_photos";
|
2022-11-15 14:52:49 +00:00
|
|
|
}
|
|
|
|
{
|
2024-07-06 17:20:28 +01:00
|
|
|
source = "Storage:Music";
|
|
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Phoenix-Cryptidz-Storage/Music";
|
2023-03-19 11:44:27 +00:00
|
|
|
id = "phoenix_b2_music";
|
2022-11-15 14:52:49 +00:00
|
|
|
}
|
2023-07-09 20:46:08 +01:00
|
|
|
{
|
2024-07-06 17:20:28 +01:00
|
|
|
source = "Storage:Personal";
|
|
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Phoenix-Cryptidz-Storage/Personal";
|
2023-07-09 20:46:08 +01:00
|
|
|
id = "phoenix_b2_personal";
|
|
|
|
}
|
2023-07-29 20:35:27 +01:00
|
|
|
{
|
2024-07-06 17:20:28 +01:00
|
|
|
source = "Storage:Public";
|
|
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Phoenix-Cryptidz-Storage/Public";
|
2023-07-29 20:35:27 +01:00
|
|
|
id = "phoenix_b2_public";
|
|
|
|
}
|
2024-04-28 11:54:10 +01:00
|
|
|
{
|
2024-07-13 17:19:06 +01:00
|
|
|
source = "B2-Chaos-Notes:Chaos-Notes";
|
2024-07-06 17:20:28 +01:00
|
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Phoenix-Cryptidz-Storage/Notes";
|
2024-04-28 11:54:10 +01:00
|
|
|
id = "phoenix_b2_notes";
|
|
|
|
}
|
2022-11-15 14:52:49 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|