mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-23 12:24:54 +02:00
backup-cloud: clean up and simplify code
This commit is contained in:
parent
505074e6d3
commit
5f1656b7ce
1 changed files with 4 additions and 6 deletions
|
@ -49,13 +49,11 @@
|
||||||
|
|
||||||
:execute {
|
:execute {
|
||||||
:global BackupPassword;
|
:global BackupPassword;
|
||||||
# we are not interested in output, but print is
|
|
||||||
# required to fetch information from cloud
|
:local Backup ([ /system/backup/cloud/find ]->0);
|
||||||
/system/backup/cloud/print as-value;
|
:if ([ :typeof $Backup ] = "id") do={
|
||||||
:delay 20ms;
|
|
||||||
:if ([ :len [ /system/backup/cloud/find ] ] > 0) do={
|
|
||||||
/system/backup/cloud/upload-file action=create-and-upload \
|
/system/backup/cloud/upload-file action=create-and-upload \
|
||||||
password=$BackupPassword replace=[ get ([ find ]->0) name ];
|
password=$BackupPassword replace=$Backup;
|
||||||
} else={
|
} else={
|
||||||
/system/backup/cloud/upload-file action=create-and-upload \
|
/system/backup/cloud/upload-file action=create-and-upload \
|
||||||
password=$BackupPassword;
|
password=$BackupPassword;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue