{
:local date ([:pick [/system clock get date] 4 6] . [:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 7 11]);
:local backupfile ([/system identity get name] . "-" . $date);
#ftp account
:local ftphost "192.168.1.2";
:local ftpuser "User";
:local ftppassword "passw";
:local ftppath "/";
#create full system backup files
/system backup save dont-encrypt=yes name="$backupfile.backup";
:delay 5s;
#create config export files
/export file="$backupfile.rsc";
:delay 10s;
# upload the system backup
:log info message="Uploading system backup"
/tool fetch address="$ftphost" src-path="$backupfile.backup" user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$backupfile.backup" upload=yes
:delay 10s;
# upload the config export
:log info message="Uploading config export"
/tool fetch address="$ftphost" src-path="$backupfile.rsc" user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$backupfile.rsc" upload=yes
:delay 5s;
# find file name $backupfile- then remove
/file remove [find name~".backup"];
/file remove [find name~".rsc"];
#:foreach i in=[/file find] do={ :if ([:typeof [:find [/file get $i name] "$backupfile"]]!="nil") do={/file remove $i}; }
:log info message="Configuration backup finished";
}
(000072)02.04.2019 15:01:43 - (not logged in) (192.168.0.1)> Connected on port 21, sending welcome message...
(000072)02.04.2019 15:01:43 - (not logged in) (192.168.0.1)> 220-FileZilla Server 0.9.60 beta
(000072)02.04.2019 15:01:43 - (not logged in) (192.168.0.1)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000072)02.04.2019 15:01:43 - (not logged in) (192.168.0.1)> 220 Please visit https://filezilla-project.org/
(000072)02.04.2019 15:01:43 - (not logged in) (192.168.0.1)> USER User
(000072)02.04.2019 15:01:43 - (not logged in) (192.168.0.1)> 331 Password required for user
(000072)02.04.2019 15:01:43 - (not logged in) (192.168.0.1)> PASS *******
(000072)02.04.2019 15:01:43 - user (192.168.0.1)> 230 Logged on
(000072)02.04.2019 15:01:43 - user (192.168.0.1)> TYPE I
(000072)02.04.2019 15:01:43 - user (192.168.0.1)> 200 Type set to I
(000072)02.04.2019 15:01:43 - user (192.168.0.1)> PASV
(000072)02.04.2019 15:01:43 - user (192.168.0.1)> 227 Entering Passive Mode (192,168,1,2,247,215)
(000072)02.04.2019 15:01:44 - user (192.168.0.1)> STOR //.txt
(000072)02.04.2019 15:01:44 - user (192.168.0.1)> 150 Opening data channel for file upload to server of "/.txt"
(000072)02.04.2019 15:01:44 - user (192.168.0.1)> 226 Successfully transferred "/.txt"
(000072)02.04.2019 15:01:44 - user (192.168.0.1)> disconnected.
схема графически простая.
тут мне надо почитать информацию