Community discussions

MikroTik App
 
upnort
newbie
Topic Author
Posts: 49
Joined: Wed Aug 15, 2018 2:03 am

Winbox, WINE, and copying backup files

Sat Aug 18, 2018 1:56 am

I have been searching the forum to no avail.

I am using Winbox 3.17 in WINE 3.0.2 in Ubuntu MATE 16.04.

I want to copy backup files from a router to a computer.

1. I am unable to use drag and drop. Does this work under WINE? I found older threads discussing the problem but the threads indicate the problem was resolved some time ago. Then again, that might be Windows only.

2. Is there a different way to copy backup files from a router? Using scp (ssh) makes sense but I don't know the file path inside the router to pull files.

I tried using the 'Upload' button but that button acts like a "download" button and wants to pull files from a computer directory.

Webfig is not an option at this point because we do not yet have certificates installed to use https. FTP is not secure and likewise not palatable.

Otherwise Winbox in WINE is working fine.

Thanks. :)

Edit: Not initially intuitive but I figured out how to download the backup files to a computer. There is a "right-click" option but I got disoriented because of the "Upload" button at the top of the window. I also found a note in the wiki that drag and drop does not work under WINE. This is half correct. Drag and drop works OK from the computer's file manager to Winbox but not vice-versa. Pity that Winbox is not cross-platform. :(

Edit: I would still like to know how to use scp to pull files from a router. Thanks. :)
 
User avatar
nachopro
just joined
Posts: 17
Joined: Tue May 26, 2020 11:38 pm

Re: Winbox, WINE, and copying backup files

Thu Jun 18, 2020 7:20 am

Hi. Can you download files to your PC using linux?

Thanks!
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11582
Joined: Thu Mar 03, 2016 10:23 pm

Re: Winbox, WINE, and copying backup files

Thu Jun 18, 2020 8:38 am

2. Is there a different way to copy backup files from a router? Using scp (ssh) makes sense but I don't know the file path inside the router to pull files.

Use relative paths ... and those are same as in winbox. E.g. if you perform a backup inside winbox (and name backup "blabla"), it will create file named "blabla.backup" in the "root" of files section. Then you fetch that file using
scp <admin_user>@router:blabla.backup .

N.B.: when using scp, I think you either have to use same username as when file was created, or administrative username. When I created backup within winbox, I was using administrative username ... and could not fetch the backup file using read-only user.
Uploading using scp works similarly ...

If you happen to attach another disk to router (e.g. USB flash) which then appears as disk1/ under files section in winbox, you then use scp user@router:disk1/file.txt . ...

BTW, I did the following test: running winbox 3.21 x64 under wine (debian buster), right clicked the file I wanted to transfer from router to local host, selected download ... winbox then opened a window to select download target ... I could select "Desktop -> / -> home -> <user> -> <directory>" ... and in my wine installation, "drive" Z: is mapped to linux' root partition and I could browse through to "Z:\home\<user>\<directory>" ... either way the downloaded file nicely appeared as /home/<user>/<directory>/blabla.backup . And upload file works similarly.

BTW2: I suggest to create both binary backup file (File -> Backup) as well as ASCII configuration export. The former is nice to restore configuration back on the same device as backup was made (restore on another device same model works, but some additional work has to be done afterwards), but doesn't work on device of different model. The later is human-readable configuration (sort-of, one has to have intimate knowledge of ROSish) and one can transfer configuration to another device models (running ROS) with some tinkerink. Allows inspection for some suspicious configuration (e.g. after router has been compromised). The trouble is that ASCII export can't be done within GUI, one has to do it in CLI (either "New Terminal" from winbox/webfig or ssh to device) and execute "/export file=myexport.rsc" (enter full file name including extension ... as resulting file is ASCII text, one can set extension to ".txt" as well) ... the resulting file will be placed in the root of Files section, just like backup files ...
 
User avatar
nachopro
just joined
Posts: 17
Joined: Tue May 26, 2020 11:38 pm

Re: Winbox, WINE, and copying backup files

Thu Jun 18, 2020 9:37 am

Thanks mkx, it's working for me :)

Who is online

Users browsing this forum: yosue111 and 30 guests