Page 1 of 1

Automatic Cloud Backup

Posted: Sun Jan 02, 2022 8:52 pm
by pierfrancescoelia
Hi folks!
I've tried many times (and searched on this forum) to set-up the Scheduler so that once a week my Mikrotik gets backed up in the cloud, but unfortunately I couldn't find a working solution.

This is the export of my actual Scheduler item, it obviously not works:
/system scheduler
add interval=1w name=cloud-backup on-event="/system backup cloud remove-file number=0\r\
    \n/system backup cloud upload-file action=create-and-upload password=MY_PASSWPRD" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jan/01/2022 start-time=03:00:00
If I copy-n-paste the code of the script on a terminal, firstly the remove command and eventually the backup command, they work. Conversely, if I execute the two commands at the same time they don't work; I believe I need to set a little pause between them.

Thanks in advance for anyone who's going to help!
Have a nice day! :)

Re: Automatic Cloud Backup

Posted: Sun Jan 02, 2022 9:31 pm
by infabo
You can replace an existing backup without removing before.
system/backup/cloud/upload-file action=create-and-upload replace=[/system/backup/cloud/find 0] password=pass

Re: Automatic Cloud Backup

Posted: Mon Jan 03, 2022 1:48 pm
by eworm
You could try my script Upload backup to Mikrotik cloud. It handles the upload and sends a notification with state.

Re: Automatic Cloud Backup

Posted: Sat Feb 12, 2022 9:31 pm
by pierfrancescoelia
Thanks to both of you! I just tried the solution proposed by @infabo.

Just to know and to better tune the scheduler, are the policies ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon actually needed?

Thanks in advance.