From c8ebcc9c414537c9870c48a96c961afaa0a88ea5 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 27 Jan 2014 12:02:56 +0900 Subject: [PATCH] Rename project to pg_arman This is officially a fork! --- .gitignore | 2 +- Makefile | 14 +++--- README | 24 +++++------ backup.c | 6 +-- catalog.c | 4 +- data.c | 2 +- delete.c | 4 +- dir.c | 2 +- doc/.gitignore | 2 +- doc/Makefile | 8 ++-- doc/{pg_rman.txt => pg_arman.txt} | 60 +++++++++++++------------- expected/init.out | 6 +-- expected/option.out | 20 ++++----- expected/show_validate.out | 10 ++--- fetch.c | 2 +- init.c | 10 ++--- parray.c | 2 +- pg_rman.c => pg_arman.c | 12 +++--- pg_rman.h => pg_arman.h | 8 ++-- restore.c | 6 +-- show.c | 2 +- sql/backup_restore.sh | 72 +++++++++++++++---------------- sql/init.sql | 4 +- sql/option.sh | 56 ++++++++++++------------ sql/show_validate.sql | 10 ++--- status.c | 2 +- util.c | 2 +- validate.c | 8 ++-- xlog.c | 2 +- 29 files changed, 181 insertions(+), 181 deletions(-) rename doc/{pg_rman.txt => pg_arman.txt} (88%) rename pg_rman.c => pg_arman.c (96%) rename pg_rman.h => pg_arman.h (97%) diff --git a/.gitignore b/.gitignore index 828a11ba..d2c08e90 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ .deps # Binaries -/pg_rman +/pg_arman # Generated by test suite /regression.diffs diff --git a/Makefile b/Makefile index b42186b3..3e2413da 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PROGRAM = pg_rman +PROGRAM = pg_arman SRCS = \ backup.c \ catalog.c \ @@ -8,7 +8,7 @@ SRCS = \ fetch.c \ init.c \ parray.c \ - pg_rman.c \ + pg_arman.c \ restore.c \ show.c \ status.c \ @@ -19,15 +19,15 @@ SRCS = \ pgut/pgut-port.c OBJS = $(SRCS:.c=.o) -DOCS = doc/pg_rman.txt +DOCS = doc/pg_arman.txt # asciidoc and xmlto are present, so install the html documentation and man # pages as well. html is part of the vanilla documentation. Man pages need a # special handling at installation. ifneq ($(ASCIIDOC),) ifneq ($(XMLTO),) -man_DOCS = doc/pg_rman.1 -DOCS += doc/pg_rman.html doc/README.html +man_DOCS = doc/pg_arman.1 +DOCS += doc/pg_arman.html doc/README.html endif # XMLTO endif # ASCIIDOC @@ -41,7 +41,7 @@ PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) else -subdir = contrib/pg_rman +subdir = contrib/pg_arman top_builddir = ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk @@ -51,7 +51,7 @@ endif LIBS := $(filter-out -lxml2, $(LIBS)) LIBS := $(filter-out -lxslt, $(LIBS)) -$(OBJS): pg_rman.h +$(OBJS): pg_arman.h # Part related to documentation # Compile documentation as well is ASCIIDOC and XMLTO are defined diff --git a/README b/README index 456c3003..74f0cabe 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ -pg_rman -======= +pg_arman +======== -pg_rman is a backup and recovery manager for PostgreSQL servers able to do +pg_arman is a backup and recovery manager for PostgreSQL servers able to do incremental, archive and full backup as well as restore a cluster to a state defined by a given recovery target. It is designed to perform periodic backups of an existing PostgreSQL server, combined with WAL @@ -14,18 +14,18 @@ Download -------- The latest version of this software can be found on the project website at -https://github.com/michaelpq/pg_rman. +https://github.com/michaelpq/pg_arman. Installation ------------ -Compiling pg_rman requires a PostgreSQL installation and can be done in +Compiling pg_arman requires a PostgreSQL installation and can be done in two ways: -1. Put pg_rman project directory inside PostgreSQL source tree as -contrib/pg_rman, and use this command for compilation: +1. Put pg_arman project directory inside PostgreSQL source tree as +contrib/pg_arman, and use this command for compilation: - $ cd $POSTGRES_SOURCE/contrib/pg_rman + $ cd $POSTGRES_SOURCE/contrib/pg_arman $ make 2. Keep the project directory as-is and use the PGXS development @@ -36,13 +36,13 @@ compilation: In addition, you must have pg_config in $PATH. -The current version of pg_rman is compatible with PostgreSQL 9.3 and +The current version of pg_arman is compatible with PostgreSQL 9.3 and upper versions. Platforms --------- -pg_rman has been tested on Linux and Unix-based platforms. +pg_arman has been tested on Linux and Unix-based platforms. Documentation ------------- @@ -69,7 +69,7 @@ install xmlto and asciidoc: Regression tests ---------------- -The test suite of pg_rman is available in the code tree and can be +The test suite of pg_arman is available in the code tree and can be launched in a way similar to common PostgreSQL extensions and modules: 1) "make check" or "make installcheck" if the project directory is @@ -81,5 +81,5 @@ directory is kept as-is. License ------- -pg_rman can be distributed under the PostgreSQL license. See COPYRIGHT +pg_arman can be distributed under the PostgreSQL license. See COPYRIGHT file for more information. diff --git a/backup.c b/backup.c index d09cfc5a..62980b3a 100644 --- a/backup.c +++ b/backup.c @@ -7,7 +7,7 @@ *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" #include #include @@ -109,7 +109,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt) /* notify start of backup to PostgreSQL server */ time2iso(label, lengthof(label), current.start_time); - strncat(label, " with pg_rman", lengthof(label)); + strncat(label, " with pg_arman", lengthof(label)); pg_start_backup(label, smooth_checkpoint, ¤t); /* If backup_label does not exist in $PGDATA, stop taking backup */ @@ -464,7 +464,7 @@ do_backup(pgBackupOption bkupopt) elog(ERROR_SYSTEM, _("can't lock backup catalog.")); else if (ret == 1) elog(ERROR_ALREADY_RUNNING, - _("another pg_rman is running, skip this backup.")); + _("another pg_arman is running, skip this backup.")); /* initialize backup result */ current.status = BACKUP_STATUS_RUNNING; diff --git a/catalog.c b/catalog.c index 782a883c..7463399e 100644 --- a/catalog.c +++ b/catalog.c @@ -7,7 +7,7 @@ *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" #include #include @@ -28,7 +28,7 @@ static pgBackup *catalog_read_ini(const char *path); static int lock_fd = -1; /* - * Lock of the catalog with pg_rman.ini file and return 0. + * Lock of the catalog with pg_arman.ini file and return 0. * If the lock is held by another one, return 1 immediately. */ int diff --git a/data.c b/data.c index a1e2a375..03169cf3 100644 --- a/data.c +++ b/data.c @@ -7,7 +7,7 @@ *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" #include #include diff --git a/delete.c b/delete.c index 3ae3141a..10736279 100644 --- a/delete.c +++ b/delete.c @@ -7,7 +7,7 @@ *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" static int pgBackupDeleteFiles(pgBackup *backup); @@ -29,7 +29,7 @@ do_delete(pgBackupRange *range) elog(ERROR_SYSTEM, _("can't lock backup catalog.")); else if (ret == 1) elog(ERROR_ALREADY_RUNNING, - _("another pg_rman is running, stop delete.")); + _("another pg_arman is running, stop delete.")); /* Get complete list of backup */ backup_list = catalog_get_backup_list(NULL); diff --git a/dir.c b/dir.c index 670b5509..1ea6932a 100644 --- a/dir.c +++ b/dir.c @@ -7,7 +7,7 @@ *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" #include #include diff --git a/doc/.gitignore b/doc/.gitignore index c979edc6..972e4e46 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,4 +1,4 @@ # Documentation entries /*.html /*.xml -/pg_rman.1 +/pg_arman.1 diff --git a/doc/Makefile b/doc/Makefile index 043bc475..97c2fca3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,9 +1,9 @@ -manpages = pg_rman.1 +manpages = pg_arman.1 -EXTRA_DIST = pg_rman.txt Makefile $(manpages) +EXTRA_DIST = pg_arman.txt Makefile $(manpages) -htmls = pg_rman.html README.html +htmls = pg_arman.html README.html # We have asciidoc and xmlto, so build everything and define correct # rules for build. @@ -12,7 +12,7 @@ ifneq ($(XMLTO),) dist_man_MANS = $(manpages) doc_DATA = $(htmls) -pg_rman.1: pg_rman.xml $(doc_DATA) +pg_arman.1: pg_arman.xml $(doc_DATA) $(XMLTO) man $< %.xml: %.txt diff --git a/doc/pg_rman.txt b/doc/pg_arman.txt similarity index 88% rename from doc/pg_rman.txt rename to doc/pg_arman.txt index 8f1b60b5..bc564026 100644 --- a/doc/pg_rman.txt +++ b/doc/pg_arman.txt @@ -1,12 +1,12 @@ -= pg_rman(1) = += pg_arman(1) = == NAME == -pg_rman - Backup and recovery manager for PostgreSQL +pg_arman - Backup and recovery manager for PostgreSQL == SYNOPSIS == -pg_rman [ OPTIONS ] +pg_arman [ OPTIONS ] { init | backup | restore | @@ -20,7 +20,7 @@ files. == DESCRIPTION == -pg_rman is a utility program to backup and restore PostgreSQL database. +pg_arman is a utility program to backup and restore PostgreSQL database. It proposes the following features: @@ -34,7 +34,7 @@ It proposes the following features: == COMMANDS == -pg_rman supports the following commands. See also *OPTIONS* for more +pg_arman supports the following commands. See also *OPTIONS* for more details. *init*:: @@ -61,11 +61,11 @@ details. First, you need to create "a backup catalog" to store backup files and their metadata. It is recommended to setup archive_mode and archive_command in postgresql.conf before initializing the backup catalog. If the variables -are initialized, pg_rman can adjust the config file to the setting. In this +are initialized, pg_arman can adjust the config file to the setting. In this case, you have to specify the database cluster path for PostgreSQL. Please specify it in PGDATA environmental variable or -D/--pgdata option. - $ pg_rman init -B /path/to/backup/ + $ pg_arman init -B /path/to/backup/ === BACKUP === @@ -83,7 +83,7 @@ Unverified backup cannot be used in restore and in incremental backup. PostgreSQL server should be stopped before performing a restore. If database cluster still exists, restore command will save unarchived transaction log and delete all database files. You can retry recovery until a new backup is -taken. After restoring files, pg_rman creates recovery.conf in $PGDATA. The +taken. After restoring files, pg_arman creates recovery.conf in $PGDATA. The conf file contains parameters for recovery. It is as well possible to modify the file manually. @@ -100,9 +100,9 @@ the restore will be a restore target. To reduce the number of command line arguments, you can set BACKUP_PATH, an environment variable, to the absolute path of the backup catalog and -write default configuration into ${BACKUP_PATH}/pg_rman.ini. +write default configuration into ${BACKUP_PATH}/pg_arman.ini. - $ cat $BACKUP_PATH/pg_rman.ini + $ cat $BACKUP_PATH/pg_arman.ini ARCLOG_PATH = /home/postgres/arclog BACKUP_MODE = F COMPRESS_DATA = YES @@ -116,20 +116,20 @@ write default configuration into ${BACKUP_PATH}/pg_rman.ini. This example takes a full backup of the whole database. Then, it validates all unvalidated backups. - $ pg_rman backup --backup-mode=full - $ pg_rman validate + $ pg_arman backup --backup-mode=full + $ pg_arman validate === RESTORE FROM A BACKUP === Here are some commands to restore from a backup: $ pg_ctl stop -m immediate - $ pg_rman restore + $ pg_arman restore $ pg_ctl start === SHOW A BACKUP === - $ pg_rman show + $ pg_arman show ================================================================================================== Start Mode Current TLI Parent TLI Time Data WAL Log Backup Status ================================================================================================== @@ -158,7 +158,7 @@ The fields are: When a date is specified, more details about a backup is retrieved: - $ pg_rman show '2011-11-27 19:15:45' + $ pg_arman show '2011-11-27 19:15:45' # configuration BACKUP_MODE=FULL COMPRESS_DATA=false @@ -183,7 +183,7 @@ the specified date. == OPTIONS == -pg_rman accepts the following command line parameters. Some of them can +pg_arman accepts the following command line parameters. Some of them can be also specified as environment variables. See also *PARAMETERS* for the details. @@ -203,12 +203,12 @@ absolute paths; relative paths are not allowed. The absolute path of backup catalog. This option is mandatory. *-c* / *--check*:: - If specifed, pg_rman doesn't perform actual jobs but only checks + If specifed, pg_arman doesn't perform actual jobs but only checks parameters and required resources. The option is typically used with --verbose option to verify the operation. *-v* / *--verbose*:: - If specified, pg_rman works in verbose mode. + If specified, pg_arman works in verbose mode. === BACKUP OPTIONS === @@ -286,10 +286,10 @@ Parameters to connect PostgreSQL server. password. *-W* / *--password*:: - Force pg_rman to prompt for a password before connecting to a database. - This option is never essential, since pg_rman will automatically + Force pg_arman to prompt for a password before connecting to a database. + This option is never essential, since pg_arman will automatically prompt for a password if the server demands password authentication. - However, pg_rman will waste a connection attempt in order to find out + However, pg_arman will waste a connection attempt in order to find out if the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. @@ -342,13 +342,13 @@ environment variables supported by libpq (see Environment Variables) == RESTRICTIONS == -pg_rman has the following restrictions. +pg_arman has the following restrictions. - Requires to read database cluster directory and write backup catalog directory. It is usually necessary to mount the disk where backup catalog is placed with NFS or related from database server. -- Major versions of pg_rman and server should match. -- Block sizes of pg_rman and server should match. +- Major versions of pg_arman and server should match. +- Block sizes of pg_arman and server should match. - If there are some unreadable files/directories in data folder of server WAL directory or archived WAL directory, the backup or restore will fail depending on the backup mode selected. @@ -358,7 +358,7 @@ pg_rman has the following restrictions. == DETAILS == === RECOVERY TO POINT-IN-TIME === -pg_rman can recover to point-in-time if timeline, transaction ID, or +pg_arman can recover to point-in-time if timeline, transaction ID, or timestamp is specified in recovery.conf. xlogdump is a contrib module of PostgreSQL core that allows checking in the content of WAL files and determine when to recover. This might help. @@ -370,7 +370,7 @@ are required if the value contains whitespaces. Comments should start with excluding values. === EXIT CODE === -pg_rman returns exit codes for each error status. +pg_arman returns exit codes for each error status. Code Name Description 0 SUCCESS Operation succeeded. @@ -387,14 +387,14 @@ pg_rman returns exit codes for each error status. 20 ERROR_ARCHIVE_FAILED Cannot archive WAL file 21 ERROR_NO_BACKUP Backup file not found 22 ERROR_CORRUPTED Backup file is broken - 23 ERROR_ALREADY_RUNNING Cannot start because another pg_rman + 23 ERROR_ALREADY_RUNNING Cannot start because another pg_arman is running 24 ERROR_PG_INCOMPATIBLE Version conflicted with server 25 ERROR_PG_RUNNING Error due to server running 26 ERROR_PID_BROKEN postmaster.pid is broken == AUTHOR == -pg_rman was originally written by NTT, mainly Itagaki Takahiro, and maintained -in some way by Michael Paquier. +pg_arman is a fork of pg_rman that was originally written by NTT, now +maintained by Michael Paquier. -Please report bug reports at . +Please report bug reports at . diff --git a/expected/init.out b/expected/init.out index dc9cf549..f8831982 100644 --- a/expected/init.out +++ b/expected/init.out @@ -1,11 +1,11 @@ \! rm -rf results/init_test -\! pg_rman init -B ${PWD}/results/init_test --quiet;echo $? +\! pg_arman init -B ${PWD}/results/init_test --quiet;echo $? 0 \! find results/init_test | xargs ls -Fd | sort results/init_test/ results/init_test/backup/ results/init_test/backup/pg_xlog/ -results/init_test/pg_rman.ini -\! pg_rman init -B ${PWD}/results/init_test --quiet;echo $? +results/init_test/pg_arman.ini +\! pg_arman init -B ${PWD}/results/init_test --quiet;echo $? ERROR: backup catalog already exist. and it's not empty. 2 diff --git a/expected/option.out b/expected/option.out index 2e11cadd..5eedbd53 100644 --- a/expected/option.out +++ b/expected/option.out @@ -1,13 +1,13 @@ \! sh sql/option.sh -pg_rman manage backup/recovery of PostgreSQL database. +pg_arman manage backup/recovery of PostgreSQL database. Usage: - pg_rman OPTION init - pg_rman OPTION backup - pg_rman OPTION restore - pg_rman OPTION show [DATE] - pg_rman OPTION validate [DATE] - pg_rman OPTION delete DATE + pg_arman OPTION init + pg_arman OPTION backup + pg_arman OPTION restore + pg_arman OPTION show [DATE] + pg_arman OPTION validate [DATE] + pg_arman OPTION delete DATE Common Options: -D, --pgdata=PATH location of the database storage area @@ -47,9 +47,9 @@ Generic options: --help show this help, then exit --version output version information, then exit -Read the website for details. -Report bugs to . -pg_rman 1.3dev +Read the website for details. +Report bugs to . +pg_arman 1.3dev ERROR: required parameter not specified: BACKUP_PATH (-B, --backup-path) ERROR: required parameter not specified: ARCLOG_PATH (-A, --arclog-path) ERROR: required parameter not specified: BACKUP_PATH (-B, --backup-path) diff --git a/expected/show_validate.out b/expected/show_validate.out index fc34ab28..a23bba42 100644 --- a/expected/show_validate.out +++ b/expected/show_validate.out @@ -1,25 +1,25 @@ -- test show command \! rm -rf ${PWD}/results/sample_backup \! cp -rp data/sample_backup ${PWD}/results/sample_backup -\! pg_rman show -A ${PWD}/results/arclog -B ${PWD}/results/sample_backup +\! pg_arman show -A ${PWD}/results/arclog -B ${PWD}/results/sample_backup ========================================================================== Start Mode Current TLI Parent TLI Time Data Status ========================================================================== 2009-06-03 17:05:53 FULL 1 0 0m ---- RUNNING 2009-06-01 17:05:53 INCR 1 0 3m 9223PB DONE 2009-05-31 17:05:53 FULL 1 0 3m 1242MB DONE -\! pg_rman validate -B ${PWD}/results/sample_backup 2009-05-31 17:05:53 --debug +\! pg_arman validate -B ${PWD}/results/sample_backup 2009-05-31 17:05:53 --debug INFO: validate: 2009-05-31 17:05:53 backup and archive log files by CRC LOG: database files... LOG: (1/1) PG_VERSION LOG: backup 2009-05-31 17:05:53 is valid -\! pg_rman validate -B ${PWD}/results/sample_backup 2009-06-01 17:05:53 --debug +\! pg_arman validate -B ${PWD}/results/sample_backup 2009-06-01 17:05:53 --debug INFO: validate: 2009-06-01 17:05:53 backup and archive log files by CRC LOG: database files... LOG: (1/1) PG_VERSION WARNING: CRC of backup file "PG_VERSION" must be 0 but FEF71BC1 WARNING: backup 2009-06-01 17:05:53 is corrupted -\! pg_rman show -a -A ${PWD}/results/arclog -B ${PWD}/results/sample_backup +\! pg_arman show -a -A ${PWD}/results/arclog -B ${PWD}/results/sample_backup ========================================================================== Start Mode Current TLI Parent TLI Time Data Status ========================================================================== @@ -27,7 +27,7 @@ Start Mode Current TLI Parent TLI Time Data Status 2009-06-02 17:05:03 FULL 1 0 0m ---- DELETED 2009-06-01 17:05:53 INCR 1 0 3m 9223PB CORRUPT 2009-05-31 17:05:53 FULL 1 0 3m 1242MB OK -\! pg_rman show 2009-06-01 17:05:53 -A ${PWD}/results/arclog -B ${PWD}/results/sample_backup +\! pg_arman show 2009-06-01 17:05:53 -A ${PWD}/results/arclog -B ${PWD}/results/sample_backup # configuration BACKUP_MODE=INCREMENTAL COMPRESS_DATA=false diff --git a/fetch.c b/fetch.c index 922e4b0d..99118c00 100644 --- a/fetch.c +++ b/fetch.c @@ -19,7 +19,7 @@ #include #include -#include "pg_rman.h" +#include "pg_arman.h" /* * Read a file into memory. The file to be read is /. diff --git a/init.c b/init.c index 179c871b..633b6552 100644 --- a/init.c +++ b/init.c @@ -7,7 +7,7 @@ *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" #include #include @@ -60,11 +60,11 @@ do_init(void) parse_postgresql_conf(path, &log_directory, &archive_command); } - /* create pg_rman.ini */ + /* create pg_arman.ini */ join_path_components(path, backup_path, PG_RMAN_INI_FILE); fp = fopen(path, "wt"); if (fp == NULL) - elog(ERROR_SYSTEM, _("can't create pg_rman.ini: %s"), strerror(errno)); + elog(ERROR_SYSTEM, _("can't create pg_arman.ini: %s"), strerror(errno)); /* set ARCLOG_PATH refered with log_directory */ if (arclog_path == NULL && archive_command && archive_command[0]) @@ -107,10 +107,10 @@ do_init(void) } else if (archive_command && archive_command[0]) elog(WARNING, "ARCLOG_PATH is not set because failed to parse archive_command '%s'." - "Please set ARCLOG_PATH in pg_rman.ini or environmental variable", archive_command); + "Please set ARCLOG_PATH in pg_arman.ini or environmental variable", archive_command); else elog(WARNING, "ARCLOG_PATH is not set because archive_command is empty." - "Please set ARCLOG_PATH in pg_rman.ini or environmental variable"); + "Please set ARCLOG_PATH in pg_arman.ini or environmental variable"); fprintf(fp, "\n"); fclose(fp); diff --git a/parray.c b/parray.c index 8ac988cb..5c7f2dea 100644 --- a/parray.c +++ b/parray.c @@ -7,7 +7,7 @@ *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" /* members of struct parray are hidden from client. */ struct parray diff --git a/pg_rman.c b/pg_arman.c similarity index 96% rename from pg_rman.c rename to pg_arman.c index bc6e10f3..a90b2dd0 100644 --- a/pg_rman.c +++ b/pg_arman.c @@ -1,22 +1,22 @@ /*------------------------------------------------------------------------- * - * pg_rman.c: Backup/Recovery manager for PostgreSQL. + * pg_arman.c: Backup/Recovery manager for PostgreSQL. * * Copyright (c) 2009-2013, NIPPON TELEGRAPH AND TELEPHONE CORPORATION * *------------------------------------------------------------------------- */ -#include "pg_rman.h" +#include "pg_arman.h" #include #include #include #include -const char *PROGRAM_VERSION = "1.3dev"; -const char *PROGRAM_URL = "https://github.com/michaelpq/pg_rman"; -const char *PROGRAM_EMAIL = "https://github.com/michaelpq/pg_rman/issues"; +const char *PROGRAM_VERSION = "0.1"; +const char *PROGRAM_URL = "https://github.com/michaelpq/pg_arman"; +const char *PROGRAM_EMAIL = "https://github.com/michaelpq/pg_arman/issues"; /* path configuration */ char *backup_path; @@ -76,7 +76,7 @@ static pgut_option options[] = }; /* - * Entry point of pg_rman command. + * Entry point of pg_arman command. */ int main(int argc, char *argv[]) diff --git a/pg_rman.h b/pg_arman.h similarity index 97% rename from pg_rman.h rename to pg_arman.h index 7ed49ccf..be091edc 100644 --- a/pg_rman.h +++ b/pg_arman.h @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * pg_rman.h: Backup/Recovery manager for PostgreSQL. + * pg_arman.h: Backup/Recovery manager for PostgreSQL. * * Copyright (c) 2009-2013, NIPPON TELEGRAPH AND TELEPHONE CORPORATION * @@ -29,7 +29,7 @@ #define PG_XLOG_DIR "pg_xlog" #define PG_TBLSPC_DIR "pg_tblspc" #define BACKUP_INI_FILE "backup.ini" -#define PG_RMAN_INI_FILE "pg_rman.ini" +#define PG_RMAN_INI_FILE "pg_arman.ini" #define MKDIRS_SH_FILE "mkdirs.sh" #define DATABASE_FILE_LIST "file_database.txt" #define SNAPSHOT_SCRIPT_FILE "snapshot_script" @@ -52,7 +52,7 @@ #define ERROR_ARCHIVE_FAILED 20 /* cannot archive xlog file */ #define ERROR_NO_BACKUP 21 /* backup was not found in the catalog */ #define ERROR_CORRUPTED 22 /* backup catalog is corrupted */ -#define ERROR_ALREADY_RUNNING 23 /* another pg_rman is running */ +#define ERROR_ALREADY_RUNNING 23 /* another pg_arman is running */ #define ERROR_PG_INCOMPATIBLE 24 /* block size is not compatible */ #define ERROR_PG_RUNNING 25 /* PostgreSQL server is running */ #define ERROR_PID_BROKEN 26 /* postmaster.pid file is broken */ @@ -115,7 +115,7 @@ typedef enum BackupMode } BackupMode; /* - * pg_rman takes backup into the directroy $BACKUP_PATH//