Logs missing after router reboot

Hello, i’m having an issue with mikrotik logs, i save logs locally in the router in files but when i reboot the router all previous logs are missing and logs start over from 0.
Please can anyone help me?

/system routerboard print
routerboard: yes
board-name: hAP ac
model: RouterBOARD 962UiGS-5HacT2HnT
serial-number: 6F1206402976
firmware-type: qca9550L
factory-firmware: 3.31
current-firmware: 3.34
upgrade-firmware: 6.41

/system resource print
uptime: 15m41s
version: 6.41 (stable)
build-time: Dec/22/2017 11:55:15
factory-software: 6.34.2
free-memory: 103.2MiB
total-memory: 128.0MiB
cpu: MIPS 74Kc V5.0
cpu-count: 1
cpu-frequency: 720MHz
cpu-load: 1%
free-hdd-space: 4540.0KiB
total-hdd-space: 16.0MiB
write-sect-since-reboot: 821
write-sect-total: 5577080
bad-blocks: 0%
architecture-name: mipsbe
board-name: hAP ac
platform: MikroTik

\

/system logging> print detail

Flags: X - disabled, I - invalid, * - default
0 * topics=info,!wireless prefix=“” action=info
1 * topics=error prefix=“” action=error
2 * topics=warning prefix=“” action=warning
3 * topics=critical prefix=“” action=critical


/system logging action> print detail

Flags: * - default
0 * name=“memory” target=memory memory-lines=1000 memory-stop-on-full=no
1 * name=“disk” target=disk disk-file-name=“Log” disk-lines-per-file=10000 disk-file-count=1 disk-stop-on-full=no
2 * name=“echo” target=echo remember=no
3 * name=“remote” target=remote remote=0.0.0.0 remote-port=514 src-address=0.0.0.0 bsd-syslog=no syslog-time-format=bsd-syslog syslog-facility=daemon syslog-severity=auto
4 name=“info” target=disk disk-file-name=“info” disk-lines-per-file=50000 disk-file-count=1 disk-stop-on-full=no
5 name=“critical” target=disk disk-file-name=“critical” disk-lines-per-file=50000 disk-file-count=1 disk-stop-on-full=no
6 name=“error” target=disk disk-file-name=“error” disk-lines-per-file=50000 disk-file-count=1 disk-stop-on-full=no
7 name=“warning” target=disk disk-file-name=“warning” disk-lines-per-file=50000 disk-file-count=1 disk-stop-on-full=no

Your device is equipped with a so called “SPI flash”, which means what you see in the /file menu is actually stored in RAM and is lost any time you reboot your router and only content of the /flash directory is persisted to permanent storage. A quote from here:

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.

So, to solve your problem you should simply store your log files in the /flash directory, for example:

/system logging action
add name="info" target=disk disk-file-name="/flash/info.log" disk-lines-per-file=50000 disk-file-count=1 disk-stop-on-full=no

Thank you very much, problem solved.