データのバックアップ †dump †すべてのDBをバックアップ †$ /usr/local/pgsql/bin/pg_dumpall > outputfile 特定のDBだけバックアップ †$ /usr/local/pgsql/bin/pg_dump DB名 > outputfile 特定のDBのリストア †$ /usr/local/pgsql/bin/psql -d postgres < outputfile 特定のテーブルのバックアップ †$ /usr/local/pgsql/bin/pg_dump -U ユーザ名 -t テーブル データベース名 > outputfile copy †※データの中身だけ出力 pgsql=> \copy table_name to '/tmp/20070509.txt' (エクスポート) pgsql=> \copy table_name from '/tmp/20070509.txt' (インポート) CSVファイル出力 †$ su - postgres $ psql -U ユーザ名 -d データベース名 -c "SELECT * FROM sample_talbe LIMIT 10" -F, -A -o filename.csv
Counter: 9941,
today: 1,
yesterday: 0
|