woocode / sa-auto / sh / pg_restore.sh


SH_DIR=$(dirname $(which $0))
. $SH_DIR/pg_env.sh

if [ "$1" = "fe001" ] ; then
   dropdb -U postgres fe001
   psql -U postgres  <  $APP/datbak/fe001.dump
elif [ "$1" = "cmsdb" ]; then
  dropdb -U postgres cmsdb
  psql -U postgres <  $APP/datbak/cmsdb.dump
	echo "usage: $0 fe001|cmsdb"

#dropdb -U postgres cmsdb

#drop table cmsuser;
#drop table docs;
#drop table node;
#drop table subdir;
#drop table tlog;
#drop table ufile;

#pg_dump -f fe001.dump -E "UTF-8" fe001
#pg_dump -f imagedb.dump -E "UTF-8" imagedb
#/apps/pgsql/bin/pg_/approot/pgsql/bin/pg_restore -U fetip -c -d fe001 fe001.dump
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.