Im running a script on routers which backs up configuration over ftp, all of them are connected over wireguard site to site vpn.
all of the routers succefully upload files, but for some reason one of them is reporting failure in logs, but also uploads part of the file. it generates 64Kb file and file on ftp server is only 10Kb
here are the lines from log
executing script FTP-Backup from winbox failed, please check it manually
failure: connection timeout (/tool/fetch; line 8)
router is rb5009
for test purposes I ran the same script on CRS326 which is behind the router in question and it reported Upload to 172.17.0.7 FINISHED
here is the script I created with help of grok
:local id [/system identity get name]
:local fname ($id . "-" . [:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . "-" . [:pick [/system clock get time] 0 8])
/system backup save name=("$fname.backup") password=""
RB5009 was running 7.20.1 update to 7.20.4 didn’t resolve an issue
I’m puzzled. Out of 4 remote RB5009 routers one is failing to upload full file, no matter how many times I run the script it uploads exactly 10.69KB out of 69.2 saved to the flash
I just tried another router L009UiGS running 7.20.4 with the same failure. Out of 80.4KB only 12.02 makes to FTP. Out of curiosity i ran the script on older cAP ac with version 6.49.19 and it executed perfectly, it even deleted backup files from flash, which is not working on newer devices
I use a similar script, but on other routers, and without using dates or deleting files, I simply overwrite them in the router and on FTP. My devices are in the screenshot.
Your script, by the way, doesn't parse the date correctly, as far as I understand, so the files turn out like this:
--21202-1-10:30:52 Try my script on problematic routers. I have FTP on port 8021, change it to your port
:local backupfilename ([/system identity get name])