From 54d707f82c096f5683fbac5663a13b210d68dfba Mon Sep 17 00:00:00 2001 From: octospacc Date: Tue, 19 Nov 2024 12:03:53 +0100 Subject: [PATCH] Auto-Backup $'Tue Nov 19 2024 12:03:51 GMT+0100 (Central European Standard Time)' --- .../Root/Main/Server/Scripts/BackupAll.zx.mjs | 44 ++++++++++++------- .../Main/Server/Scripts/CleanBackups.zx.mjs | 2 +- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs b/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs index d2e3da6..e54dc37 100755 --- a/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs +++ b/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs @@ -225,28 +225,38 @@ Jobs.Cloud_Private = () => $`sudo -u tux rclone sync /Main/Clouds/octt GDrive-Un //////////////////////////////////////////////////////////////////////////////// +const Main = async () => { + await Work('Local_MiscSimpleBackups'); + await Work('Local_Shiori'); + await Work('Local_SpaccBBS'); + await Work('Local_SpaccBBSNodeBB'); + await Work('Local_liminalgici'); + await Work('Local_Doku'); + + await Work('Mixed_Configs'); + await Work('Mixed_Snippets'); + await Work('Mixed_OctospaccAltervista'); + //await Work('Mixed_SpacccraftAltervista'); + //await Work('Exter_WikiSpacc'); + + await Work('Cloud_ServerBackupLimited'); + await Work('Cloud_ArticlesBackupPrivate'); + await Work('Cloud_SpaccBBS'); + await Work('Cloud_SpaccBBSNodeBB'); + await Work('Cloud_liminalgici'); + await Work('Cloud_Doku'); + await Work('Cloud_SpaccCraft'); + await Work('Cloud_Private'); +}; + +//////////////////////////////////////////////////////////////////////////////// + $`echo Begin ${Time.Stamp} > ${BackupsBase}/Last.log`; -await Work('Local_MiscSimpleBackups'); -await Work('Local_Shiori'); -await Work('Local_SpaccBBS'); -await Work('Local_SpaccBBSNodeBB'); -await Work('Local_liminalgici'); -await Work('Local_Doku'); +//await Main(); await Work('Mixed_Configs'); await Work('Mixed_Snippets'); await Work('Mixed_OctospaccAltervista'); -//await Work('Mixed_SpacccraftAltervista'); -//await Work('Exter_WikiSpacc'); - -await Work('Cloud_ServerBackupLimited'); -await Work('Cloud_ArticlesBackupPrivate'); -await Work('Cloud_SpaccBBS'); -await Work('Cloud_SpaccBBSNodeBB'); -await Work('Cloud_liminalgici'); -await Work('Cloud_Doku'); -await Work('Cloud_SpaccCraft'); -await Work('Cloud_Private'); $`echo End ${Time.Stamp} > ${BackupsBase}/Last.log`; diff --git a/Server/Root/Main/Server/Scripts/CleanBackups.zx.mjs b/Server/Root/Main/Server/Scripts/CleanBackups.zx.mjs index 063250a..48557bf 100755 --- a/Server/Root/Main/Server/Scripts/CleanBackups.zx.mjs +++ b/Server/Root/Main/Server/Scripts/CleanBackups.zx.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env zx const BackupsBase = '/Main/Backup'; -const TimeLimit = { years: 0, months: 1, days: 0 }; +const TimeLimit = { years: 0, months: 0, days: 25 }; const maxDate = (new Date()); maxDate.setDate(maxDate.getDate() - TimeLimit.days);