Subversion Repositories computer_asset_manager_v1

Rev

Rev 1 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

<?php
   
   /* Just a linking table to available backup servers */
   $DATABASE_DEFINITION['backups_server'] = array( 
      'table name' => 'backups_server',
      'key field' => 'backups_server_id',
      'display columns' => array('device_id','backups_server_id','backup_space'),
      'display query' => 'select device_id,backups_server_id,backup_space from backups_server',
      'field info' => array(
         'device_id' => array('display name' => 'device_id' , 'type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
         'backups_server_id' => array('display name' => 'backups_server_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
         /* size in bytes available for backups */
         'backup_space' => array('display name' => 'backup_space' , 'type' => 'bigint')
      )
   );
   /* stores information on backup jobs allocated */
   $DATABASE_DEFINITION['backups'] = array( 
      'table name' => 'backups',
      'key field' => 'backups_id',
      'display columns' => array('backups_server_id','device_id','responsible_party','backups_id','notes','allocated_size','start_time'),
      'display query' => 'select backups_server_id,device_id,responsible_party,backups_id,notes,allocated_size,start_time from backups',
      'field info' => array(
         'backups_server_id' => array('display name' => 'backups_server_id' , 'type' => 'lookup', 'table' => 'backup_server', 'keyfield' => 'backups_server_id', 'display_field' => 'name'),
         'device_id' => array('display name' => 'device_id' , 'type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
         /* email address of who to notify for problems */
         'responsible_party' => array('display name' => 'responsible_party' , 'type' => 'string' , 'width' => 64),
         'backups_id' => array('display name' => 'backups_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
         /* any notes we want to keep on this */
         'notes' => array('display name' => 'notes' , 'type' => 'text'),
         /* number of bytes client is paying for */
         'allocated_size' => array('display name' => 'allocated_size' , 'default' => 1073741824 , 'type' => 'bigint'),
         /* default start time of backup */
         'start_time' => array('display name' => 'start_time' , 'type' => 'time')
      )
   );
   /* added for each backup that runs */
   $DATABASE_DEFINITION['backups_run'] = array( 
      'table name' => 'backups_run',
      'key field' => 'backups_run_id',
      'display columns' => array('files_count','report_date','version','start_time','files_deleted','files_size','backups_run_id','backups_id','end_time','data_received','data_sent','transferred_count','transferred_size'),
      'display query' => 'select files_count,report_date,version,start_time,files_deleted,files_size,backups_run_id,backups_id,end_time,data_received,data_sent,transferred_count,transferred_size from backups_run',
      'field info' => array(
         /* total number of files to be checked */
         'files_count' => array('display name' => 'files_count' , 'type' => 'bigint'),
         /* Date on the actual log file as part of its filename */
         'report_date' => array('display name' => 'report_date' , 'required' => true , 'type' => 'datetime'),
         /* Version of rsbackup creating processing this run */
         'version' => array('display name' => 'version' , 'type' => 'string' , 'width' => 10),
         /* when job started */
         'start_time' => array('display name' => 'start_time' , 'required' => true , 'default' => '0000-00-00 00:00:00' , 'type' => 'datetime'),
         /* number of files which were deleted */
         'files_deleted' => array('display name' => 'files_deleted' , 'type' => 'bigint'),
         /* size of all files to be checked in bytes */
         'files_size' => array('display name' => 'files_size' , 'type' => 'bigint'),
         'backups_run_id' => array('display name' => 'backups_run_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
         'backups_id' => array('display name' => 'backups_id' , 'type' => 'lookup', 'table' => 'backups', 'keyfield' => 'backups_id', 'display_field' => 'name'),
         /* when job ended */
         'end_time' => array('display name' => 'end_time' , 'required' => true , 'default' => '0000-00-00 00:00:00' , 'type' => 'datetime'),
         /* bytes received from server */
         'data_received' => array('display name' => 'data_received' , 'type' => 'bigint'),
         /* bytes sent to server */
         'data_sent' => array('display name' => 'data_sent' , 'type' => 'bigint'),
         /* number of files transferred */
         'transferred_count' => array('display name' => 'transferred_count' , 'type' => 'bigint'),
         /* size of files transferred in bytes */
         'transferred_size' => array('display name' => 'transferred_size' , 'type' => 'bigint')
      )
   );
   /* periodic reports from backup server itself on space used */
   $DATABASE_DEFINITION['backups_usage'] = array( 
      'table name' => 'backups_usage',
      'key field' => 'backups_usage_id',
      'display columns' => array('report_date','disk_usage','backups_usage_id','num_dirs','backups_id','num_files'),
      'display query' => 'select report_date,disk_usage,backups_usage_id,num_dirs,backups_id,num_files from backups_usage',
      'field info' => array(
         'report_date' => array('display name' => 'report_date' , 'required' => true , 'default' => '0000-00-00' , 'type' => 'date'),
         /* bytes used on backup server */
         'disk_usage' => array('display name' => 'disk_usage' , 'type' => 'bigint'),
         'backups_usage_id' => array('display name' => 'backups_usage_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
         /* number of directories on backup server */
         'num_dirs' => array('display name' => 'num_dirs' , 'type' => 'bigint'),
         'backups_id' => array('display name' => 'backups_id' , 'type' => 'lookup', 'table' => 'backups', 'keyfield' => 'backups_id', 'display_field' => 'name'),
         /* number of files on backup server */
         'num_files' => array('display name' => 'num_files' , 'type' => 'bigint')
      )
   );
?>