Zinc backup scripts

From DISI
Jump to navigation Jump to search
/usr/pgsql-9.2/bin/pg_basebackup --pgdata /var/lib/pgsql/9.2/backups/ZINC15-9.2-20160331 --format=t -z --xlog --progress --label=mem-backup --verbose -h localhost -U replication

This builds a local tarball:  /var/lib/pgsql/9.2/backups/ZINC15-9.2-20160331/base.tar.gz

You can also call it from another server with "-h mem.cluster.ucsf.bkslab.org" to generate the backup remotely.

If you call it without --format=t -z it writes directly to the specified --pgdata directory. That method is useful for initializing a new slave.