mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
upload-backup: wait for file
This commit is contained in:
parent
8cbb053686
commit
b9c699b29f
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
||||||
:global LogPrintExit;
|
:global LogPrintExit;
|
||||||
:global SendNotification;
|
:global SendNotification;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
:global WaitForFile;
|
||||||
|
|
||||||
:if ($BackupSendBinary != true && \
|
:if ($BackupSendBinary != true && \
|
||||||
$BackupSendExport != true) do={
|
$BackupSendExport != true) do={
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
# binary backup
|
# binary backup
|
||||||
:if ($BackupSendBinary = true) do={
|
:if ($BackupSendBinary = true) do={
|
||||||
/ system backup save encryption=aes-sha256 name=$FileName password=$BackupPassword;
|
/ system backup save encryption=aes-sha256 name=$FileName password=$BackupPassword;
|
||||||
|
$WaitForFile ($FileName . ".backup");
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
/ tool fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \
|
/ tool fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \
|
||||||
|
@ -51,6 +53,7 @@
|
||||||
# create configuration export
|
# create configuration export
|
||||||
:if ($BackupSendExport = true) do={
|
:if ($BackupSendExport = true) do={
|
||||||
/ export terse file=$FileName;
|
/ export terse file=$FileName;
|
||||||
|
$WaitForFile ($FileName . ".rsc");
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
/ tool fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \
|
/ tool fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \
|
||||||
|
|
Loading…
Reference in a new issue