Changeset 31318
- Timestamp:
- Apr 18, 2011, 3:01:58 PM (15 years ago)
- Location:
- trunk/tools/mysql-dump
- Files:
-
- 3 edited
-
gpc1Import.py (modified) (1 diff)
-
gpc1_dump.sh (modified) (3 diffs)
-
gpc1_install.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/mysql-dump/gpc1Import.py
r31209 r31318 15 15 gpc1dumps=commands.getoutput('ls -t -1 /export/ipp001.0/ipp/mysql-dumps/mysql-gpc1*') 16 16 dumparray=gpc1dumps.split()[1] 17 cmd=' gunzip< '+dumparray+' | mysql -hipp001 -u ipp -pipp -f ' + newname17 cmd='bunzip2 < '+dumparray+' | mysql -hipp001 -u ipp -pipp -f ' + newname 18 18 results = commands.getstatusoutput(cmd) 19 19 -
trunk/tools/mysql-dump/gpc1_dump.sh
r31229 r31318 8 8 # - it deletes the old MySQL dumps 9 9 # - it deletes the old MD5 checksum file 10 # 2) It calls mysqldump to dump gpc1 to some gzipped file10 # 2) It calls mysqldump to dump gpc1 to some bzipped file 11 11 # 3) It computes the checksum 12 12 # 4) It copies the dump and the checksum files onto the TARGET_HOST … … 28 28 #1) Cleaning 29 29 log INFO "Deleting old dumps" 30 for file in `find $DUMP_PATH -name mysql-gpc1-$HOST-\*.dump. gz`; do30 for file in `find $DUMP_PATH -name mysql-gpc1-$HOST-\*.dump.bz`; do 31 31 log INFO "Deleting $file" 32 32 /bin/rm -f $file … … 37 37 #2) Dumping 38 38 DATEVAR=`date +%FT%T` #date 39 FILENAME=$DUMP_PATH/mysql-gpc1-$HOST-$DATEVAR.dump. gz #dump file name39 FILENAME=$DUMP_PATH/mysql-gpc1-$HOST-$DATEVAR.dump.bz #dump file name 40 40 DB_USERNAME=gpc1_dump 41 41 MD5FILENAME=$DUMP_PATH/gpc1_checksum.md5 42 42 log INFO "Dumping to $FILENAME" 43 /usr/bin/mysqldump -h localhost -u $DB_USERNAME -p$DB_PASSWORD --flush-logs --single-transaction gpc1 | gzip -9> $FILENAME43 /usr/bin/mysqldump -h localhost -u $DB_USERNAME -p$DB_PASSWORD --flush-logs --single-transaction gpc1 | ~ipp/local/bin/pbzip2 > $FILENAME 44 44 dump_status=${PIPESTATUS[0]} 45 45 if [ "$dump_status" -ne "0" ]; then -
trunk/tools/mysql-dump/gpc1_install.sh
r31235 r31318 10 10 # 2) Check the gpc1 dump file against its checksum. 11 11 # 3) Distribute the validated files, that is: 12 # - Hard-links the gzipped MySQL dump in the distribution directory12 # - Hard-links the bzipped MySQL dump in the distribution directory 13 13 # - Moves the MD5 checksum to the distribution directory 14 14 # 4) Import gpc1 into gpc1_0 or gpc1_1 (ensured by gpc1Import.py utility) … … 21 21 MD5FILE=gpc1_checksum.md5 22 22 23 DISTRIBUTION_TARGET=$TARGET/distribution/ippdb01-gpc1.dump. gz23 DISTRIBUTION_TARGET=$TARGET/distribution/ippdb01-gpc1.dump.bz 24 24 DISTRIBUTION_MD5=$TARGET/distribution/ippdb01-gpc1.md5 25 25
Note:
See TracChangeset
for help on using the changeset viewer.
