aboutsummaryrefslogtreecommitdiffstats
path: root/backup-cloud.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-04-29 17:37:28 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-04-29 23:02:48 +0200
commit57ebcfb41cbd078ba62c7d4e7e921ffdae834521 (patch)
treec37e5f9141b9a8f2066d1e8c649d0fdcdb17492a /backup-cloud.rsc
parent5f1656b7ce439e6567803299eaddca215e8cb7cf (diff)
backup-cloud: retry on error...
Let's see if brute force helps. 🤪
Diffstat (limited to 'backup-cloud.rsc')
-rw-r--r--backup-cloud.rsc28
1 files changed, 16 insertions, 12 deletions
diff --git a/backup-cloud.rsc b/backup-cloud.rsc
index bdc6c34..88dd345 100644
--- a/backup-cloud.rsc
+++ b/backup-cloud.rsc
@@ -47,19 +47,23 @@
:error false;
}
- :execute {
- :global BackupPassword;
+ :local I 5;
+ :do {
+ :execute {
+ :global BackupPassword;
- :local Backup ([ /system/backup/cloud/find ]->0);
- :if ([ :typeof $Backup ] = "id") do={
- /system/backup/cloud/upload-file action=create-and-upload \
- password=$BackupPassword replace=$Backup;
- } else={
- /system/backup/cloud/upload-file action=create-and-upload \
- password=$BackupPassword;
- }
- /file/add name="tmpfs/backup-cloud/done";
- } as-string;
+ :local Backup ([ /system/backup/cloud/find ]->0);
+ :if ([ :typeof $Backup ] = "id") do={
+ /system/backup/cloud/upload-file action=create-and-upload \
+ password=$BackupPassword replace=$Backup;
+ } else={
+ /system/backup/cloud/upload-file action=create-and-upload \
+ password=$BackupPassword;
+ }
+ /file/add name="tmpfs/backup-cloud/done";
+ } as-string;
+ :set I ($I - 1);
+ } while=([ $WaitForFile "tmpfs/backup-cloud/done" 200ms ] = false && $I > 0);
:if ([ $WaitForFile "tmpfs/backup-cloud/done" ] = true) do={
:local Cloud [ /system/backup/cloud/get ([ find ]->0) ];