mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-21 18:17:06 +02:00
Replace BACKUP_PATH in the source files
This commit is contained in:
parent
17037baea2
commit
90a4a4f4b3
@ -1128,7 +1128,7 @@ pg_probackup add-instance -B <replaceable>backup_dir</replaceable> -D <replaceab
|
||||
<replaceable>backup_dir</replaceable> directory and at least read-only
|
||||
access to <replaceable>data_dir</replaceable> directory. If you
|
||||
specify the path to the backup catalog in the
|
||||
<envar>BACKUP_PATH</envar> environment variable, you can
|
||||
<envar>BACKUP_DIR</envar> environment variable, you can
|
||||
omit the corresponding option when running <application>pg_probackup</application>
|
||||
commands.
|
||||
</para>
|
||||
@ -5212,14 +5212,14 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable>
|
||||
<varlistentry>
|
||||
<term><option>-B <replaceable>directory</replaceable></option></term>
|
||||
<term><option>--backup-path=<replaceable>directory</replaceable></option></term>
|
||||
<term><envar>BACKUP_PATH</envar></term>
|
||||
<term><envar>BACKUP_DIR</envar></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the absolute path to the backup catalog. Backup
|
||||
catalog is a directory where all backup files and meta
|
||||
information are stored. Since this option is required for most
|
||||
of the <application>pg_probackup</application> commands, you are recommended to specify
|
||||
it once in the <envar>BACKUP_PATH</envar> environment variable. In this case,
|
||||
it once in the <envar>BACKUP_DIR</envar> environment variable. In this case,
|
||||
you do not need to use this option each time on the command
|
||||
line.
|
||||
</para>
|
||||
@ -5679,7 +5679,7 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable>
|
||||
lazily, when the first log message is written.
|
||||
</para>
|
||||
<para>
|
||||
Default: <filename>$BACKUP_PATH/log/</filename>
|
||||
Default: <filename>$BACKUP_DIR/log/</filename>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -5762,7 +5762,7 @@ pg_probackup catchup -b <replaceable>catchup_mode</replaceable>
|
||||
reached, the log file is rotated once a <application>pg_probackup</application> command
|
||||
is launched, except <command>help</command> and <command>version</command> commands. The time of the
|
||||
last log file creation is stored in
|
||||
<filename>$BACKUP_PATH/log/log_rotation</filename>. The zero value disables
|
||||
<filename>$BACKUP_DIR/log/log_rotation</filename>. The zero value disables
|
||||
time-based rotation. Supported units: ms, s, min, h, d (min by
|
||||
default).
|
||||
</para>
|
||||
|
2
po/ru.po
2
po/ru.po
@ -811,7 +811,7 @@ msgstr ""
|
||||
#: src/help.c:360 src/help.c:521 src/help.c:588 src/help.c:635 src/help.c:715
|
||||
#: src/help.c:761 src/help.c:833
|
||||
#, c-format
|
||||
msgid " directory for file logging (default: BACKUP_PATH/log)\n"
|
||||
msgid " directory for file logging (default: BACKUP_DIR/log)\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/help.c:361 src/help.c:522 src/help.c:589 src/help.c:636 src/help.c:716
|
||||
|
@ -113,7 +113,7 @@ static parray *setup_push_filelist(const char *archive_status_dir,
|
||||
* set archive_command to
|
||||
* 'pg_probackup archive-push -B /home/anastasia/backup --wal-file-name %f',
|
||||
* to move backups into arclog_path.
|
||||
* Where archlog_path is $BACKUP_PATH/wal/instance_name
|
||||
* Where archlog_path is $BACKUP_DIR/wal/instance_name
|
||||
*/
|
||||
void
|
||||
do_archive_push(InstanceState *instanceState, InstanceConfig *instance, char *pg_xlog_dir,
|
||||
@ -1126,7 +1126,7 @@ do_archive_get(InstanceState *instanceState, InstanceConfig *instance, const cha
|
||||
join_path_components(absolute_wal_file_path, current_dir, wal_file_path);
|
||||
|
||||
/* full filepath to WAL file in archive directory.
|
||||
* $BACKUP_PATH/wal/instance_name/000000010000000000000001 */
|
||||
* $BACKUP_DIR/wal/instance_name/000000010000000000000001 */
|
||||
join_path_components(backup_wal_file_path, instanceState->instance_wal_subdir_path, wal_file_name);
|
||||
|
||||
INSTR_TIME_SET_CURRENT(start_time);
|
||||
|
@ -1437,7 +1437,7 @@ get_multi_timeline_parent(parray *backup_list, parray *tli_list,
|
||||
}
|
||||
|
||||
/*
|
||||
* Create backup directory in $BACKUP_PATH
|
||||
* Create backup directory in $BACKUP_DIR
|
||||
* (with proposed backup->backup_id)
|
||||
* and initialize this directory.
|
||||
* If creation of directory fails, then
|
||||
|
22
src/help.c
22
src/help.c
@ -372,7 +372,7 @@ help_backup(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -548,7 +548,7 @@ help_restore(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -621,7 +621,7 @@ help_validate(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -674,7 +674,7 @@ help_checkdb(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -760,7 +760,7 @@ help_delete(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -814,7 +814,7 @@ help_merge(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -890,7 +890,7 @@ help_set_config(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -1002,7 +1002,7 @@ help_add_instance(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -1072,7 +1072,7 @@ help_archive_push(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -1131,7 +1131,7 @@ help_archive_get(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
@ -1221,7 +1221,7 @@ help_catchup(void)
|
||||
printf(_(" --error-log-filename=error-log-filename\n"));
|
||||
printf(_(" filename for error logging (default: none)\n"));
|
||||
printf(_(" --log-directory=log-directory\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_PATH/log)\n"));
|
||||
printf(_(" directory for file logging (default: BACKUP_DIR/log)\n"));
|
||||
printf(_(" --log-rotation-size=log-rotation-size\n"));
|
||||
printf(_(" rotate logfile if its size exceeds this value; 0 disables; (default: 0)\n"));
|
||||
printf(_(" available units: 'kB', 'MB', 'GB', 'TB' (default: kB)\n"));
|
||||
|
@ -468,10 +468,10 @@ main(int argc, char *argv[])
|
||||
if (backup_path == NULL)
|
||||
{
|
||||
/*
|
||||
* If command line argument is not set, try to read BACKUP_PATH
|
||||
* If command line argument is not set, try to read BACKUP_DIR
|
||||
* from environment variable
|
||||
*/
|
||||
backup_path = getenv("BACKUP_PATH");
|
||||
backup_path = getenv("BACKUP_DIR");
|
||||
}
|
||||
|
||||
if (backup_path != NULL)
|
||||
@ -498,7 +498,7 @@ main(int argc, char *argv[])
|
||||
backup_subcmd != CATCHUP_CMD)
|
||||
elog(ERROR,
|
||||
"No backup catalog path specified.\n"
|
||||
"Please specify it either using environment variable BACKUP_PATH or\n"
|
||||
"Please specify it either using environment variable BACKUP_DIR or\n"
|
||||
"command line option --backup-path (-B)");
|
||||
|
||||
/* ===== catalogState (END) ======*/
|
||||
|
@ -837,13 +837,13 @@ typedef struct InstanceState
|
||||
CatalogState *catalog_state;
|
||||
|
||||
char instance_name[MAXPGPATH]; //previously global var instance_name
|
||||
/* $BACKUP_PATH/backups/instance_name */
|
||||
/* $BACKUP_DIR/backups/instance_name */
|
||||
char instance_backup_subdir_path[MAXPGPATH];
|
||||
|
||||
/* $BACKUP_PATH/backups/instance_name/BACKUP_CATALOG_CONF_FILE */
|
||||
/* $BACKUP_DIR/backups/instance_name/BACKUP_CATALOG_CONF_FILE */
|
||||
char instance_config_path[MAXPGPATH];
|
||||
|
||||
/* $BACKUP_PATH/backups/instance_name */
|
||||
|
||||
/* $BACKUP_DIR/backups/instance_name */
|
||||
char instance_wal_subdir_path[MAXPGPATH]; // previously global var arclog_path
|
||||
|
||||
/* TODO: Make it more specific */
|
||||
|
@ -13,11 +13,11 @@
|
||||
|
||||
typedef struct CatalogState
|
||||
{
|
||||
/* $BACKUP_PATH */
|
||||
/* $BACKUP_DIR */
|
||||
char catalog_path[MAXPGPATH]; //previously global var backup_path
|
||||
/* $BACKUP_PATH/backups */
|
||||
/* $BACKUP_DIR/backups */
|
||||
char backup_subdir_path[MAXPGPATH];
|
||||
/* $BACKUP_PATH/wal */
|
||||
/* $BACKUP_DIR/wal */
|
||||
char wal_subdir_path[MAXPGPATH]; // previously global var arclog_path
|
||||
} CatalogState;
|
||||
|
||||
|
@ -34,7 +34,7 @@ class OptionTest(ProbackupTest, unittest.TestCase):
|
||||
except ProbackupException as e:
|
||||
self.assertIn(
|
||||
'ERROR: No backup catalog path specified.\n' + \
|
||||
'Please specify it either using environment variable BACKUP_PATH or\n' + \
|
||||
'Please specify it either using environment variable BACKUP_DIR or\n' + \
|
||||
'command line option --backup-path (-B)',
|
||||
e.message,
|
||||
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(repr(e.message), self.cmd))
|
||||
|
Loading…
Reference in New Issue
Block a user