User Tools

Site Tools


snapshot_backup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
snapshot_backup [2011/09/23 15:22]
k2patel [delete shnapshot]
snapshot_backup [2011/09/23 15:32] (current)
k2patel [Requirement :]
Line 8: Line 8:
   * perl   * perl
   * Net::​Amazon::​EC2   * Net::​Amazon::​EC2
 +  * DBI:SQLite
   * bash   * bash
  
Line 38: Line 39:
 # instance<​serial number must be unique> = <Volume ID> <​Retention Freq.> <total Retention>​ # instance<​serial number must be unique> = <Volume ID> <​Retention Freq.> <total Retention>​
  
-#instance1="​vol-2222pqrs 7 2" +instance1="​vol-2222pqrs 7 2" 
-#instance2="​vol-1111abcd 1 1"+instance2="​vol-1111abcd 1 1"
 </​code>​ </​code>​
  
Line 123: Line 124:
 #####################################​ #####################################​
  
-source config_bash 
  
-BASE=$(pwd) 
 BASE="​$( cd "$( dirname "​$0"​ )" && pwd )" BASE="​$( cd "$( dirname "​$0"​ )" && pwd )"
 cd $BASE cd $BASE
 +
 +source config_bash
 +
 DATE=$(date +%Y%m%d) DATE=$(date +%Y%m%d)
 perl=$(which perl) perl=$(which perl)
Line 339: Line 341:
  }  }
 </​code>​ </​code>​
 +
 +==== Machine DB ====
 +
 +<code bash>
 +sqlite3 machine.db
 +</​code>​
 +
 +<code sql | machine.db>​
 +PRAGMA foreign_keys=OFF;​
 +BEGIN TRANSACTION;​
 +CREATE TABLE DESK ( v_ID, s_ID, Dte );
 +</​code>​
 +
snapshot_backup.1316791350.txt.gz · Last modified: 2011/09/23 15:22 by k2patel