Project

General

Profile

« Previous | Next » 

Revision 8931

Added by Jing Tao almost 10 years ago

Add the code to vacuum the db.

View differences:

src/scripts/bash/restore-dumped-data-to-pg9.3.sh
34 34
fi
35 35
METACAT_BACKUP_FILE_NAME=$1
36 36
echo "the backup file name is $METACAT_BACKUP_FILE_NAME"
37
DECOMPRESS_DIR_NAME=`echo "$METACAT_BACKUP_FILE_NAME" | cut -d'.' -f1`
37
DECOMPRESS_DIR_NAME=${METACAT_BACKUP_FILE_NAME%%.*}
38 38
echo "the decmporessed dir is $DECOMPRESS_DIR_NAME"
39 39

  
40 40
if [ -f "$DB_BASE/$OLD_DB_BACKUP_FILE" ]; then
......
71 71

  
72 72
echo "end to move database from $OLD_DB_VERSION to $NEW_DB_VERSION at"
73 73
echo `date`
74

  
75
echo "start to vacuum the db at"
76
echo `date` >> /tmp/vacuumdb.out
77
su - postgres  -c "/usr/lib/postgresql/$NEW_DB_VERSION/bin/vacuumdb --all"
78
echo "end to vacuum the db at "
79
echo `date`
80

  

Also available in: Unified diff