mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-13 11:34:31 +02:00
backup-upload: RouterOS v7 path syntax
This commit is contained in:
parent
21c4520d17
commit
219fd994d7
1 changed files with 6 additions and 6 deletions
|
@ -58,11 +58,11 @@ $WaitFullyConnected;
|
||||||
|
|
||||||
# binary backup
|
# binary backup
|
||||||
:if ($BackupSendBinary = true) do={
|
:if ($BackupSendBinary = true) do={
|
||||||
/ system backup save encryption=aes-sha256 name=$FilePath password=$BackupPassword;
|
/system/backup/save encryption=aes-sha256 name=$FilePath password=$BackupPassword;
|
||||||
$WaitForFile ($FilePath . ".backup");
|
$WaitForFile ($FilePath . ".backup");
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
/ tool fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \
|
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \
|
||||||
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".backup");
|
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".backup");
|
||||||
:set BackupFile ($FileName . ".backup");
|
:set BackupFile ($FileName . ".backup");
|
||||||
} on-error={
|
} on-error={
|
||||||
|
@ -71,16 +71,16 @@ $WaitFullyConnected;
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/ file remove ($FilePath . ".backup");
|
/file/remove ($FilePath . ".backup");
|
||||||
}
|
}
|
||||||
|
|
||||||
# create configuration export
|
# create configuration export
|
||||||
:if ($BackupSendExport = true) do={
|
:if ($BackupSendExport = true) do={
|
||||||
/ export terse show-sensitive file=$FilePath;
|
/export terse show-sensitive file=$FilePath;
|
||||||
$WaitForFile ($FilePath . ".rsc");
|
$WaitForFile ($FilePath . ".rsc");
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
/ tool fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \
|
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \
|
||||||
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".rsc");
|
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".rsc");
|
||||||
:set ConfigFile ($FileName . ".rsc");
|
:set ConfigFile ($FileName . ".rsc");
|
||||||
} on-error={
|
} on-error={
|
||||||
|
@ -89,7 +89,7 @@ $WaitFullyConnected;
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/ file remove ($FilePath . ".rsc");
|
/file/remove ($FilePath . ".rsc");
|
||||||
}
|
}
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$0; \
|
$SendNotification2 ({ origin=$0; \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue