We tried to debug it to see if it is a problem with our code but it does not seem like it, we logged via winbox in the devices that had problems and tried making the request manually to see if it would work but it doesn’t.
PS: The file is received by the server but it is not complete because the timeout of 10s cut it
The backup script that we use:
Code: Select all
:do {
/system backup save name=&backupName;
/export file=&backupName;
/tool fetch upload=yes url=sftp://&serverIp/home/&user/&backupName.backup user=&user password=&password src-path=&backupName.backup port=&port;
/tool fetch upload=yes url=sftp://&serverIp/home/&user/&backupName.rsc user=&user password=&password src-path=&backupName.rsc port=&port;
} on-error={
:log info "Error while generating backup";
/system script remove [/system script find name=&scriptName];
/file remove "&backupName.backup";
/file remove "&backupName.rsc";
:error "Error sending the backups to the SFTP server, check if the server is up and if the credentials are correct.";
}
/system script remove [/system script find name=&scriptName];
/file remove "&backupName.backup";
/file remove "&backupName.rsc";