metacat/src/scripts/bash/vacuum-db.sh @ 9797
1 | 8922 | tao | #!/bin/bash
|
---|---|---|---|
2 | #A script to vacuum the db.
|
||
3 | #Usage: nohup ./
|
||
4 | 8926 | tao | DB_VERSION=9.3 |
5 | 8922 | tao | echo "start to vacuum the db at" >> /tmp/vacuumdb.out |
6 | 8923 | tao | echo `date` >> /tmp/vacuumdb.out |
7 | 8926 | tao | su - postgres -c "/usr/lib/postgresql/$DB_VERSION/bin/vacuumdb --all >> /tmp/vacuumdb.out 2> /tmp/vacuumdb.err < /dev/null" |
8 | 8924 | tao | echo "end to vacuum the db at " >> /tmp/vacuumdb.out |
9 | 8926 | tao | echo `date` >> /tmp/vacuumdb.out |