Community discussions

MikroTik App
 
pierfrancescoelia
just joined
Topic Author
Posts: 8
Joined: Sun Nov 17, 2019 6:00 pm

Automatic Cloud Backup

Sun Jan 02, 2022 8:52 pm

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! :)
 
infabo
Long time Member
Long time Member
Posts: 671
Joined: Thu Nov 12, 2020 12:07 pm

Re: Automatic Cloud Backup

Sun Jan 02, 2022 9:31 pm

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
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1071
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Automatic Cloud Backup

Mon Jan 03, 2022 1:48 pm

You could try my script Upload backup to Mikrotik cloud. It handles the upload and sends a notification with state.
 
pierfrancescoelia
just joined
Topic Author
Posts: 8
Joined: Sun Nov 17, 2019 6:00 pm

Re: Automatic Cloud Backup

Sat Feb 12, 2022 9:31 pm

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.

Who is online

Users browsing this forum: Bing [Bot] and 12 guests