Community discussions

MikroTik App
 
manitonetworks
Trainer
Trainer
Topic Author
Posts: 29
Joined: Wed Jul 08, 2015 9:53 pm

Cloud Backup

Sun Sep 30, 2018 3:52 am

I see a note in the Release Candidate changelog:

cloud - added command "/system backup cloud" for backup storing to cloud (CLI only)

Interesting feature! But I imagine that my customers will have some questions as this feature comes out of beta, and I have some too:
  • What country are these backups stored in?
  • Are backup copies being stored in third-party datacenters / clouds?
  • What type of encryption is being used?
Thanks!
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Cloud Backup

Mon Oct 01, 2018 1:38 pm

1) Backups are stored in Latvia
2) No 3rd parties
3) only aes-sha256 encrypted backup files are accepted
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Cloud Backup

Mon Oct 01, 2018 4:16 pm

More specifically, the backups are stored in MikroTik own datacenter, managed and accessed only by MikroTik, on MikroTik property.
 
manitonetworks
Trainer
Trainer
Topic Author
Posts: 29
Joined: Wed Jul 08, 2015 9:53 pm

Re: Cloud Backup

Mon Oct 01, 2018 7:09 pm

Thanks for the replies guys! Much appreciated.
 
Chupakabra303
just joined
Posts: 14
Joined: Tue Jun 20, 2017 3:07 pm

Re: Cloud Backup

Tue Oct 23, 2018 12:53 pm

It would be great. But it better to learn fetch tool to upload file (backup) (multipart/form-data) over http(s) on my server?
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 775
Joined: Mon May 27, 2013 2:05 am

Re: Cloud Backup

Tue Oct 23, 2018 3:02 pm

Will these be only .backup files i.e. only restorable to the same piece of hardware? Or will it take config exports too? Even better, are .backup files being worked on so you can safely restore them across devices (same device type but different MACs etc)

I only use config expoorts myself at the moment but I hear of people having a lot of trouble trying to restore .backup files to a direct replacement device
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Cloud Backup

Tue Oct 23, 2018 3:07 pm

Currently only backups for restoring on same device.
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1092
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Cloud Backup

Wed Dec 19, 2018 12:46 am

This is a nice feature, but it has one weakness: You have to remove the backup before uploading a new one. In case the removal succeeds but the upload fails you do not have a backup at all (at least in cloud). So you should consider to either
  • provide two upload slots, so one backup can be removed while the other is still available or
  • change the upload that removal is not necessary and backup is replaced on successful upload only.
 
Hammer
newbie
Posts: 40
Joined: Sat Sep 20, 2014 6:39 am

Re: Cloud Backup

Fri Mar 08, 2019 10:08 am

The only time I needed a backup was when a device was broken. That does not work in the case?
I am currently using a script for the backup.
 
Kindis
Member
Member
Posts: 441
Joined: Tue Nov 01, 2011 6:54 pm
Location: Sweden

Re: Cloud Backup

Fri Mar 08, 2019 10:54 am

The only time I needed a backup was when a device was broken. That does not work in the case?
I am currently using a script for the backup.
Back is for restore on the same device. If you restore a backup file on a different unit it will rewrite some configuration that might create issues for you.
I have a nightly backup script that sends e-mail. I get a backup file encrypted and also a export. Backup in case I F**k up and need to restore and export in case I need to change the unit.

Is the serial number the identifier for access to files? So only that unit can access the file?
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: Cloud Backup

Fri Mar 08, 2019 11:01 am

1. i would like winbox menu and not only cli.
2. at winbox window (where is cpu,memory info etc) would be nice to show last backup date (if exist) or saying "this device is not backup to mikrotik servers".
3. when upload a backup for second time or more there should be a parameter "replace=yes" to overwrite current backup that exist on server. no need to apply the command "/system backup cloud remove-file number=0" before.
 
neutronlaser
Member
Member
Posts: 445
Joined: Thu Jan 18, 2018 5:18 pm

Re: Cloud Backup

Thu Mar 14, 2019 6:15 pm

Kindis could you share your email backup script please?
 
Kindis
Member
Member
Posts: 441
Joined: Tue Nov 01, 2011 6:54 pm
Location: Sweden

Re: Cloud Backup

Fri Mar 22, 2019 9:10 am

Kindis could you share your email backup script please?
Yes here they are. I have switched from E-mail backups to FTP. So now all routers upload to a FTP server that then send the backup offsite. The reason is that the ISP I have thinks the backup generated e-mail where a sign that my SMTP account had been hacked and changed the password all the time. Here are both script.
I which I could say that I'm smart enough to take credit for these but I'm not :-) I found the e-mail script on this forum and would credit the author if I remembered the name. FTP is just a slight rewrite which I did manage myself.

Email-Backup
:log info "Automated Backup Protocol Started"
:delay 2s
;log info "Creating Backup Files. This may take several minutes."
:local sysname [/system identity get name]
:local textfilename
:local backupfilename
:local time [/system clock get time]
:local date [/system clock get date]
:local newdate "";
:for i from=0 to=([:len $date]-1) do={ :local tmp [:pick $date $i];
:if ($tmp !="/") do={ :set newdate "$newdate$tmp" }
:if ($tmp ="/") do={}
}
:if ([:find $sysname " "] !=0) do={
:local name $sysname;
:local newname "";
:for i from=0 to=([:len $name]-1) do={ :local tmp [:pick $name $i];
:if ($tmp !=" ") do={ :set newname "$newname$tmp" }
:if ($tmp =" ") do={ :set newname "$newname_" }
}
:set sysname $newname;
}
:set textfilename ($"newdate" . "-" . $"sysname" . ".rsc")
:set backupfilename ($"newdate" . "-" . $"sysname" . ".backup")
:execute [/export file=$"textfilename"]
:execute [/system backup save encryption=aes-sha256 password=Backup_Encryption_Passsword name=$"backupfilename"]
:delay 5s
:log info "Sending Export File"
/tool e-mail send to="To_E-mail_Address" subject=([/system identity get name] . \
"_Automated_Backup") from="From_E-mail_Address" file=($"newdate" . "-" . $"sysname" . ".rsc") \
server=[:resolve "SMTP_Server_FQDN"] start-tls=yes port=587 \
password=password user=username
:delay 5s
:log info "Sending Backup File"
/tool e-mail send to="To_E-mail_Address" subject=([/system identity get name] . \
"_Automated_Backup") from="From_E-mail_Address" file=($"newdate" . "-" . $"sysname" . ".backup") \
server=[:resolve "SMTP_Server_FQDN"] start-tls=yes port=587 \
password=password user=username
:delay 5s
:log info "Sending Completed"
:delay 5s
:log info "Removing Backup files from router file list"
/file remove ($"newdate" . "-" . $"sysname" . ".rsc")
/file remove ($"newdate" . "-" . $"sysname" . ".backup")
:log info "Automated Backup Protocol Completed"
FTP Backup
:log info "Automated Backup Protocol Started"
:delay 2s
;log info "Creating Backup Files. This may take several minutes."
:local sysname [/system identity get name]
:local textfilename
:local backupfilename
:local time [/system clock get time]
:local date [/system clock get date]
:local newdate "";
:for i from=0 to=([:len $date]-1) do={ :local tmp [:pick $date $i];
:if ($tmp !="/") do={ :set newdate "$newdate$tmp" }
:if ($tmp ="/") do={}
}
:if ([:find $sysname " "] !=0) do={
:local name $sysname;
:local newname "";
:for i from=0 to=([:len $name]-1) do={ :local tmp [:pick $name $i];
:if ($tmp !=" ") do={ :set newname "$newname$tmp" }
:if ($tmp =" ") do={ :set newname "$newname_" }
}
:set sysname $newname;
}
:set textfilename ($"newdate" . "-" . $"sysname" . ".rsc")
:set backupfilename ($"newdate" . "-" . $"sysname" . ".backup")
:execute [/export file=$"textfilename"]
:execute [/system backup save encryption=aes-sha256 password=Backup_Encryption_Passsword name=$"backupfilename"]
:delay 5s
:log info "Sending Export File"
/tool fetch address=FTP_Server_IP src-path=($"newdate" . "-" . $"sysname" . ".rsc") user=username mode=ftp password=password dst-path=($"newdate" . "-" . $"sysname" . ".rsc") upload=yes
:log info "Sending Backup File"
/tool fetch address=FTP_Server_IP src-path=($"newdate" . "-" . $"sysname" . ".backup") user=username mode=ftp password=password dst-path=($"newdate" . "-" . $"sysname" . ".backup") upload=yes
:log info "Sending Completed"
:log info "Removing Backup files from router file list"
/file remove ($"newdate" . "-" . $"sysname" . ".rsc")
/file remove ($"newdate" . "-" . $"sysname" . ".backup")
:log info "Automated Backup Protocol Completed"
 
neutronlaser
Member
Member
Posts: 445
Joined: Thu Jan 18, 2018 5:18 pm

Re: Cloud Backup

Fri Mar 22, 2019 2:52 pm

Thank you.
 
nathan1
Member Candidate
Member Candidate
Posts: 160
Joined: Sat Jan 16, 2016 7:05 pm

Re: Cloud Backup

Mon Mar 25, 2019 2:39 pm

This is a nice feature, but it has one weakness: You have to remove the backup before uploading a new one. In case the removal succeeds but the upload fails you do not have a backup at all (at least in cloud). So you should consider to either
  • provide two upload slots, so one backup can be removed while the other is still available or
  • change the upload that removal is not necessary and backup is replaced on successful upload only.
+1. Without two slots or a way to atomically replace the old backup with a successful new one, this feature is very limited in its usefulness. action=create-and-upload-replace would be the ideal way to do this.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Cloud Backup

Tue May 14, 2019 4:07 pm


Is the serial number the identifier for access to files? So only that unit can access the file?
when you upload file and print the information IP Cloud backup will return secret-download-key, using that you can get the file from anything running RouterOS
 
Onlineallthetime
just joined
Posts: 12
Joined: Fri Apr 20, 2018 3:52 am

Re: Cloud Backup

Wed Jun 19, 2019 10:28 am

Hello everybody

My rb760 is dead, yesterday a thunder killed him, I made a backup using the mikrotik cloud but I lost my key to download it,Can I recover my backup? or can you send it to me? with my serial number and my mac address
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1092
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Cloud Backup

Wed Jun 19, 2019 5:15 pm

Now that we have a replace mechanism since version 6.45beta42 one culprit remains:
If the cloud server is not accessible for any reason the commands in "/ system backup cloud" give fatal errors. You can not catch these as runtime errors from a script:
:do {
  / system backup cloud ...
} on-error={ ... }
On error the script will terminate in do-block. Any chance to fix that, janisk? (Already opened a ticket (Ticket#2019052022003204), but support told me this is not a runtime error. Meh!)
 
TheSirStumfy
Frequent Visitor
Frequent Visitor
Posts: 90
Joined: Sun Oct 14, 2018 7:54 pm

Re: Cloud Backup

Thu Jul 04, 2019 3:22 pm

Hello, quick question, the change-log states that a "replace" command was added in 6.45.1, however if i do "action=replace" or if i just do action=*tab* no replace command is available.
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: Cloud Backup

Thu Jul 04, 2019 3:47 pm

Here is an example "/system backup cloud upload-file action=create-and-upload replace=cloud-XXXXXXXX-XXXXXX password=123"
 
TheSirStumfy
Frequent Visitor
Frequent Visitor
Posts: 90
Joined: Sun Oct 14, 2018 7:54 pm

Re: Cloud Backup

Thu Jul 04, 2019 3:51 pm

Thanks a bunch, the documentation was not updated yet.

Regards.
 
Torontobb
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Mon Dec 26, 2016 3:28 am

Re: Cloud Backup

Mon Dec 16, 2019 11:18 pm

1) Backups are stored in Latvia
2) No 3rd parties
3) only aes-sha256 encrypted backup files are accepted
Juts for the kicks, is it possible to look at the source code that encryption applies? or it's not possible to see sourcecode of RouterOS?
 
superp
just joined
Posts: 2
Joined: Tue Sep 02, 2014 10:36 am

Re: Cloud Backup

Wed Nov 24, 2021 4:46 pm

Wow very good features!
but the "secret download key" is overwritten.
I weekly scheduled this:
/system backup cloud upload-file action=create-and-upload name=name password="dsdjasjdla" replace=name
I read and copied the secret download key for future download from any location and any device but, in case of breaks, I will not be able to download because the secret change weekly.
where am I going wrong?
Thanks for all!
 
jrosetto
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri Feb 19, 2016 9:15 pm

Re: Cloud Backup

Fri Mar 03, 2023 8:30 pm

The secret key changes every time the backup is uploaded.

Ideally I would like to schedule the cloud backup nightly and have a way to restore in the event of the router dying completely but for now it looks like this is only beneficial as a recovery point if something gets screwed up when programming or an accidental factory reset.

Better than nothing though,

Thanks!

I also have FTP backups nightly that work fine so I will stick with that for now.

Who is online

Users browsing this forum: No registered users and 16 guests