gfdump.postgresql dumps/restores metadata
of Gfarm, managed by PostgreSQL running as a backend database.
You need to execute this command on the host that the backend database of
PostgreSQL is running.
The command reads gfmd.conf, the
configuration file of gfmd to get access
information about the backend database.
If gfmd is configured in the non-private
mode, the root privilege is required to read the file.
When gfdump.postgresql is executed
with -d option, it dumps the database to the file
db.out at the current directory.
When it is executed with -r option, it restores the database
from the dump file, db.out at the
current directory.
More specifically, it does the followings.
Stop gfmd if running.
Remove the current database.
Create a database again.
Restore a database from the dump file.
Delete the current journal file of gfmd, if exists.
Start gfmd again.
--prefix path
If this option is given,
gfdump.postgresql reads
PREFIX/etc/gfmd.conf as the
configuration file of gfmd.
By default, it reads
%%SYSCONFDIR%%/etc/gfmd.conf.
-P prefix
Specify an installation prefix of the backend database (e.g. /usr/local).
When gfdump.postgresql executes a
PostgreSQL command such as pg_dump,
it assumes the command is installed under the given prefix.
If this option is omitted,
gfdump.postgresql searches directories
listed in the environment variable PATH for the commands.
-lSpecify a path to the directory where the backend database puts files to store metadata of Gfarm.
If the backend database is PostgreSQL, the directory is commonly called
PGDATA directory.
The default is PREFIX/var/gfarm-pgsql
where PREFIX is a prefix given by --prefix option.
-f file
Specify the name of dump file.
The default is
db.out at the current directory.
--helpShow usage, then exit.
-tShow values of configurable parameters in human readable format, then exit immediately.
-dDump mode.
-nDo not start/stop gfmd.
-rRestore mode.