Under Linux using the following command in shell it is possible to download all files from the router:
scp -r -p -P 22 username@192.168.88.1:/ .
Beware: there is a dot (.) at the end, meaning to save “here”, ie. in current dir.
It saves the files usually in a new subdirectory named “pckg” (or “disk” ?)
BUT: is it possible to download (and upload) just a single file when the filename is known, ie. w/o using the -r switch (for recursive)?
My tests unfortunately failed.
And uploading isn’t working in RouterOS 6.47.10 (it stalls), and seems to crash (?) the RouterOS as it throws out a logged in WebFig user.
One can of course create files on the router by doing export in CLI:
My router has USB stick plugged in (it’s mounted under /usb1-part1) and I have logging configured to store files there. The first command fetched one of older log files to linux PC. The second command copied the same file back to router, this time into /flash/ directory (my router has 16MB flash, so storage root us RAM disk and fkash is mounted under /flash/). So I ended up having two copies of that file:
If you want to scp file into router’s storage root snd you want to keep file name, then omit the remote file path entirely so that command ends at the colon sign, e.g. scp file.txt user@router:
@mkx, your setup is really interesting.
I too would like to attach a USB stick. How to configure it in RouterOS?
And how did you create a RAMdisk in RouterOS?
I still cannot upload any file via scp (it stalls, I’ve to do CTRL-C to abort scp).
Upload and download via WebFig is ok, but I need it in shell (terminal) using scp.
Warning: If device has a directory named “flash” in its file list, then files which you want to be kept after system reboot/power cycle must be stored within it. As anything outside of it is kept within a RAM disk and will be lost upon reboot. Note: this does not include .npk upgrade files as they will be applied by upgrade process before system discards the RAM drive content.
you may not have this folder
scp -P 22 user@router:/log.0.txt .
I don’t see any problems