Help with Wifi Scan backups

All related to the Kernel, packages system and libraries
ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Help with Wifi Scan backups

Post by ammarL » Wed Nov 23, 2016 3:27 am

Hi,

My Meshlium lost ethernet connectivity for a while and I was hoping to retrieve data stored locally. Now that I have re-connected it to ethernet, what is the easiest way to do that?

Note: I see that there were a few BAK files created in /mnt/user/mysql/MeshliumDB folder after the connectivity loss.

Please advise.

Thanks.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Wed Nov 23, 2016 9:23 am

Hi ammarL,

If you are not using a external cloud you should query the data directle from mysql manager via ssh, set the query between the time interval you liost ethernet connectivity and you will get the data.

Are you sending the data to an external cloud or database?

Regards

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Wed Nov 23, 2016 3:40 pm

Hi,

Yes I am sending to it to AWS RDS. When I query the MySQL database in AWS I don't see data from the last two months.

Cheers

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Thu Nov 24, 2016 5:24 am

Just an update:

Firstly thanks for the tip of querying the local database. That uncovered data that was not synced with AWS.

My question to you then is: how do I sync the local database with the MySQL database in AWS?

Thanks for the help!

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Thu Nov 24, 2016 8:48 am

Hi ammarL,

You can send your data to AWS IoT cloud, please be aware that all your unsynchronized data will be sent to this cloud, follow the steps given on out technical guide to configure AWS IoT cloud:

http://www.libelium.com/downloads/docum ... 40%3A18485

Regards

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Mon Nov 28, 2016 3:46 pm

Hi Dev,

Thanks for the reply. I was told earlier that my Meshlium version does not support sending WiFi data through MQTT: it can only sync with a database.

Is there a way to just copy existing data to the Amazon MySQL?

Thanks,
Ammar

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Tue Nov 29, 2016 8:51 am

Hi ammarL,

The Meshlium uses the field 'sync' of the sensorParser table to mark a register as sent. The value 0 in the sync field means copy the register again. You can access to your Meshlium by SSH and use "mysql" to update this field in the registers you want to "resynchronize". This is an example mysql sentence to resync all the registers:

Code: Select all

UPDATE MeshliumDB.sensorParser SET sync=0
Regards

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Fri Dec 02, 2016 6:50 am

Thanks for the help Dev.

I logged in and found that the wifiScan database is corrupted. When I attempted to run myisamchk I run into a not enough space problem. The only files bigger than +10M that I found are:

./lib/init/rw/var/log/daemon.log
./mnt/user/mysql/MeshliumDB/wifiScan-161009090306.BAK
./mnt/user/mysql/MeshliumDB/wifiScan-161002082154.BAK
./mnt/user/mysql/MeshliumDB/wifiScan.TMD
./mnt/user/mysql/MeshliumDB/wifiScan-160928235638.BAK
./mnt/user/mysql/MeshliumDB/wifiScan-161123020248.BAK
./mnt/user/mysql/MeshliumDB/wifiScan.MYI
./mnt/user/mysql/MeshliumDB/wifiScan.MYD
./mnt/user/eagleio/eagleio.jar
./mnt/user/Sofia2/Sofia2Sync.jar
./proc/kcore
find: `./proc/17425/task/17425/fd/5': No such file or directory
find: `./proc/17425/task/17425/fdinfo/5': No such file or directory
find: `./proc/17425/fd/5': No such file or directory
find: `./proc/17425/fdinfo/5': No such file or directory
./usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar
./usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/i386/client/classes.jsa
./usr/java/jre1.6.0_25/lib/i386/client/classes.jsa
./usr/java/jre1.6.0_25/lib/rt.jar
./var/cache/apt/archives/sun-java6-bin_6-26-0lenny1_i386.deb
./var/lib/apt/lists/archive.debian.org_debian_dists_lenny_main_binary-i386_Packages
./var/log/daemon.log
./instalacion.tar.gz

Which of the above should I delete to have more space? Also, any other tips to recover the damaged database tables?

Thanks,
Ammar

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Fri Dec 02, 2016 9:57 am

Hi ammarL,

Please perform thsi command to try to find out more about your issue:

Code: Select all

df -h
Then we can provide you a more accurate solution.

Regards

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Fri Dec 02, 2016 3:21 pm

Filesystem Size Used Avail Use% Mounted on
rootfs 1.5G 942M 458M 68% /
udev 10M 2.7M 7.4M 27% /dev
/dev/disk/by-label/ROOT_FS
1.5G 942M 458M 68% /
tmpfs 125M 28M 98M 22% /lib/init/rw
varrun 125M 72K 125M 1% /var/run
varlock 125M 0 125M 0% /var/lock
tmpfs 125M 4.0K 125M 1% /dev/shm
/dev/hda3 4.9G 3.0G 1.7G 64% /mnt/user
tmpfs 125M 4.0K 125M 1% /tmp
tmpfs 125M 28M 98M 22% /var/log
tmpfs 125M 28M 98M 22% /var/tmp
/dev/mapper/lib 887M 41M 802M 5% /mnt/lib

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest