GFDUMP.POSTGRESQL(8)

✨ GFDUMP.POSTGRESQL ✨

okay so bestie, this is a page from the Gfarm manual set β€” section 8, the sysadmin section, for the command gfdump.postgresql. yes she's a long name. no we're not shortening it. she's iconic and she knows it πŸ’…

πŸ’– NAME πŸ’–

gfdump.postgresql β€” dump/restore Gfarm metadata


🌸 SYNOPSIS 🌸

gfdump.postgresql -d [options]

gfdump.postgresql -r [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

So. gfdump.postgresql dumps and restores Gfarm metadata that's being managed by PostgreSQL running as the backend database. The way you have to run it is: on the host where the backend database of PostgreSQL is actually running. Like, that host. Not your laptop. Not a different node. That one. πŸ’€

The command reads gfmd.conf, the config file of gfmd, to get the access info for the backend database. And here's the tea: if gfmd is configured in non-private mode, you need root privilege to read that file. so basically bring your sudo. πŸ”‘

When gfdump.postgresql gets run with the -d option, it dumps the database into the file db.out in the current directory. simple as that, no cap.

When it gets run with -r instead, it restores the database from the dump file db.out in the current directory. but like, it's not just one thing, she does a whole little routine:

  1. Stop gfmd if it's running.
  2. Remove the current database.
  3. Create a database again.
  4. Restore a database from the dump file.
  5. Delete the current journal file of gfmd, if it exists.
  6. Start gfmd again.

she's giving full service, honestly. 🌈


πŸ‘‘ OPTIONS πŸ‘‘

  • --prefix path β€” if you pass this, gfdump.postgresql reads PREFIX/etc/gfmd.conf as the config file of gfmd. by default it reads %%SYSCONFDIR%%/etc/gfmd.conf.
  • -P prefix β€” specify an installation prefix of the backend database, like /usr/local. when gfdump.postgresql runs a PostgreSQL command such as pg_dump, it assumes that command is installed under the prefix you gave. if you omit this option, gfdump.postgresql goes looking through the directories listed in the environment variable PATH for the commands instead. πŸ”
  • -l β€” specify a path to the directory where the backend database puts files to store metadata of Gfarm.

if the backend database is PostgreSQL, that directory is commonly called the PGDATA directory. the default is PREFIX/var/gfarm-pgsql where PREFIX is a prefix given by the --prefix option.

  • -f file β€” specify the name of the dump file. default is db.out at the current directory. πŸ“„
  • --help β€” show usage, then exit. (she's helping! 🫢)
  • -t β€” show values of configurable parameters in human readable format, then exit immediately.
  • -d β€” dump mode. πŸ“€
  • -n β€” do not start/stop gfmd. (yes this is your "hands off my daemon" flag, love that for you βœ‹)
  • -r β€” restore mode. πŸ“₯

πŸŽ€ FILES πŸŽ€

  • %%SYSCONFDIR%%/gfmd.conf β€” configuration file for gfmd

πŸ’œ SEE ALSO πŸ’œ

pg_dump(1), dropdb(1), createdb(1), psql(1), gfmd(8)


okay that's the whole page bestie, you're fully caught up, go forth and dump responsibly 🧚✨

this was the Gfarm manual, dated 30 Jan 2015 β€” periodt πŸ’…πŸ“