aws server sql backup

This commit is contained in:
Ubuntu 2016-08-23 09:45:59 +01:00
parent ef22636be6
commit 33730b4311
2 changed files with 116853 additions and 4 deletions

View File

@ -44,14 +44,14 @@ var mdot = require('./lib/mdot/mdot.js');
};
var device = 3;
var device = 13;
var ids = ['CENSIS-LoRa-1','CENSIS-LoRa-2','CENSIS-LoRa-3','CENSIS-LoRa-4','HIE-mobile-1','HIE-demo','HIE-mobile-2','HIE-smart-campus-1','HIE-smart-campus-2','HIE-smart-campus-3','HIE-smart-campus-4','HIE-smart-campus-5','HIE-smart-campus-6','HIE-smart-campus-7','HIE-mDot-1'];
var data = {id: ids[device]};
var startTs = Sugar.Date.create('2016-08-19 14:46:48');
var endTs = Sugar.Date.create('2016-08-21 10:03:39');
logger.debug(startTs, endTs);
logger.debug(startTs.getTime(), endTs.getTime());
// logger.debug(startTs, endTs);
// logger.debug(startTs.getTime(), endTs.getTime());
data.start = startTs.getTime();
data.end = endTs.getTime();
@ -64,7 +64,7 @@ var mdot = require('./lib/mdot/mdot.js');
for (var item in d.events) {
var newItem = d.events[item].evt;
newItem.topic=['','','','',ids[device]].join('/');
logger.debug(newItem);
// logger.debug(newItem);
var gwTime = new Date(newItem.gateway_info['0'].gw_time);
if ((gwTime > startTs) && (gwTime < endTs)) {
doInsertEntry(newItem);

116849
mdot.sql Normal file

File diff suppressed because it is too large Load Diff