예제 #1
0
 /**
  * Run backup
  */
 public final function run()
 {
     $this->DB->stopAddingAccountID();
     $Tables = array(PREFIX . 'account', PREFIX . 'conf', PREFIX . 'dataset', PREFIX . 'hrv', PREFIX . 'plugin', PREFIX . 'plugin_conf', PREFIX . 'sport', PREFIX . 'type', PREFIX . 'user', PREFIX . 'route', PREFIX . 'training', PREFIX . 'trackdata', PREFIX . 'swimdata', PREFIX . 'equipment_type', PREFIX . 'equipment_sport', PREFIX . 'equipment', PREFIX . 'activity_equipment');
     foreach ($Tables as $TableName) {
         $this->saveTableStructure($TableName);
         $this->saveTableRows($TableName);
     }
     $this->Writer->finish();
     $this->DB->startAddingAccountID();
 }
예제 #2
0
 /**
  * Run backup
  */
 public final function run()
 {
     $this->DB->stopAddingAccountID();
     $this->startBackup();
     // REMINDER: think about required order, e.g.
     // - plugin before plugin_conf
     // - sport/type/route before training
     // - training before trackdata/swimdata/hrv
     // - equipment_Type before equipment_sport before equipment before activity_equipment
     // - tag before activity_tag
     $Tables = array(PREFIX . 'account', PREFIX . 'conf', PREFIX . 'dataset', PREFIX . 'plugin', PREFIX . 'plugin_conf', PREFIX . 'sport', PREFIX . 'type', PREFIX . 'user', PREFIX . 'route', PREFIX . 'training', PREFIX . 'trackdata', PREFIX . 'swimdata', PREFIX . 'hrv', PREFIX . 'equipment_type', PREFIX . 'equipment_sport', PREFIX . 'equipment', PREFIX . 'activity_equipment', PREFIX . 'tag', PREFIX . 'activity_tag');
     foreach ($Tables as $TableName) {
         $this->saveTableStructure($TableName);
         $this->saveTableRows($TableName);
     }
     $this->finishBackup();
     $this->Writer->finish();
     $this->DB->startAddingAccountID();
 }