Skip to content

Commit 9a2b0b2

Browse files
authored
s/pg_probackup/pg_backup/ (#2)
1 parent fdbeb53 commit 9a2b0b2

34 files changed

+487
-487
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Object files
22
*.o
3+
*.bc
34

45
# Libraries
56
*.lib
@@ -19,7 +20,7 @@
1920
.deps
2021

2122
# Binaries
22-
/pg_probackup
23+
/pg_backup
2324

2425
# Generated translated file
2526
/po/ru.mo

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
PROGRAM = pg_probackup
1+
PROGRAM = pg_backup
22
WORKDIR ?= $(CURDIR)
33
BUILDDIR = $(WORKDIR)/build/
4-
PBK_GIT_REPO = https://github.com/postgrespro/pg_probackup
4+
PBK_GIT_REPO = https://github.com/pgtoolz/pg_backup
55

66
# utils
77
OBJS = src/utils/configuration.o src/utils/json.o src/utils/logger.o \
@@ -24,7 +24,7 @@ ifdef top_srcdir
2424
srchome := $(abspath $(top_srcdir))
2525
else
2626
top_srcdir=../..
27-
ifneq (,$(wildcard ../../../contrib/pg_probackup))
27+
ifneq (,$(wildcard ../../../contrib/pg_backup))
2828
# separate build directory support
2929
srchome := $(abspath $(top_srcdir)/..)
3030
else
@@ -43,7 +43,7 @@ PG_CONFIG = pg_config
4343
PGXS := $(shell $(PG_CONFIG) --pgxs)
4444
include $(PGXS)
4545
else
46-
subdir=contrib/pg_probackup
46+
subdir=contrib/pg_backup
4747
top_builddir=../..
4848
include $(top_builddir)/src/Makefile.global
4949
include $(top_srcdir)/contrib/contrib-global.mk

doc/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generating documentation
22
```
33
xmllint --noout --valid probackup.xml
4-
xsltproc stylesheet.xsl probackup.xml >pg-probackup.html
4+
xsltproc stylesheet.xsl probackup.xml >pg_backup.html
55
```

doc/pgprobackup.xml

Lines changed: 306 additions & 306 deletions
Large diffs are not rendered by default.

nls.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# contrib/pg_probackup/nls.mk
2-
CATALOG_NAME = pg_probackup
2+
CATALOG_NAME = pg_backup
33
AVAIL_LANGUAGES = ru
44
GETTEXT_FILES = src/help.c
55
GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS)

src/archive.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-------------------------------------------------------------------------
22
*
3-
* archive.c: - pg_probackup specific archive commands for archive backups.
3+
* archive.c: - pg_backup specific archive commands for archive backups.
44
*
55
*
66
* Portions Copyright (c) 2018-2022, Postgres Professional
@@ -106,9 +106,9 @@ static parray *setup_push_filelist(const char *archive_status_dir,
106106
* At this point, we already done one roundtrip to archive server
107107
* to get instance config.
108108
*
109-
* pg_probackup specific archive command for archive backups
109+
* pg_backup specific archive command for archive backups
110110
* set archive_command to
111-
* 'pg_probackup archive-push -B /home/anastasia/backup --wal-file-name %f',
111+
* 'pg_backup archive-push -B /home/anastasia/backup --wal-file-name %f',
112112
* to move backups into arclog_path.
113113
* Where archlog_path is $BACKUP_PATH/wal/instance_name
114114
*/
@@ -154,9 +154,9 @@ do_archive_push(InstanceState *instanceState, InstanceConfig *instance, char *pg
154154
if (num_threads > parray_num(batch_files))
155155
n_threads = parray_num(batch_files);
156156

157-
elog(INFO, "pg_probackup archive-push WAL file: %s, "
157+
elog(INFO, "%s archive-push WAL file: %s, "
158158
"threads: %i/%i, batch: %lu/%i, compression: %s",
159-
wal_file_name, n_threads, num_threads,
159+
PROGRAM_NAME, wal_file_name, n_threads, num_threads,
160160
parray_num(batch_files), batch_size,
161161
is_compress ? "zlib" : "none");
162162

@@ -265,13 +265,13 @@ do_archive_push(InstanceState *instanceState, InstanceConfig *instance, char *pg
265265

266266
if (push_isok)
267267
/* report number of files pushed into archive */
268-
elog(INFO, "pg_probackup archive-push completed successfully, "
268+
elog(INFO, "%s archive-push completed successfully, "
269269
"pushed: %u, skipped: %u, time elapsed: %s",
270-
n_total_pushed, n_total_skipped, pretty_time_str);
270+
PROGRAM_NAME, n_total_pushed, n_total_skipped, pretty_time_str);
271271
else
272-
elog(ERROR, "pg_probackup archive-push failed, "
272+
elog(ERROR, "%s archive-push failed, "
273273
"pushed: %i, skipped: %u, failed: %u, time elapsed: %s",
274-
n_total_pushed, n_total_skipped, n_total_failed,
274+
PROGRAM_NAME, n_total_pushed, n_total_skipped, n_total_failed,
275275
pretty_time_str);
276276
}
277277

@@ -968,7 +968,7 @@ setup_push_filelist(const char *archive_status_dir, const char *first_file,
968968
}
969969

970970
/*
971-
* pg_probackup specific restore command.
971+
* pg_backup specific restore command.
972972
* Move files from arclog_path to pgdata/wal_file_path.
973973
*
974974
* The problem with archive-get: we must be very careful about
@@ -1027,8 +1027,8 @@ do_archive_get(InstanceState *instanceState, InstanceConfig *instance, const cha
10271027
INSTR_TIME_SET_CURRENT(start_time);
10281028
if (num_threads > batch_size)
10291029
n_actual_threads = batch_size;
1030-
elog(INFO, "pg_probackup archive-get WAL file: %s, remote: %s, threads: %i/%i, batch: %i",
1031-
wal_file_name, IsSshProtocol() ? "ssh" : "none", n_actual_threads, num_threads, batch_size);
1030+
elog(INFO, "%s archive-get WAL file: %s, remote: %s, threads: %i/%i, batch: %i",
1031+
PROGRAM_NAME, wal_file_name, IsSshProtocol() ? "ssh" : "none", n_actual_threads, num_threads, batch_size);
10321032

10331033
num_threads = n_actual_threads;
10341034

@@ -1084,8 +1084,8 @@ do_archive_get(InstanceState *instanceState, InstanceConfig *instance, const cha
10841084
validate_wal))
10851085
{
10861086
n_files_in_prefetch--;
1087-
elog(INFO, "pg_probackup archive-get used prefetched WAL segment %s, prefetch state: %u/%u",
1088-
wal_file_name, n_files_in_prefetch, batch_size);
1087+
elog(INFO, "%s archive-get used prefetched WAL segment %s, prefetch state: %u/%u",
1088+
PROGRAM_NAME, wal_file_name, n_files_in_prefetch, batch_size);
10891089
goto get_done;
10901090
}
10911091
else
@@ -1122,8 +1122,8 @@ do_archive_get(InstanceState *instanceState, InstanceConfig *instance, const cha
11221122
instance->xlog_seg_size, validate_wal))
11231123
{
11241124
n_files_in_prefetch--;
1125-
elog(INFO, "pg_probackup archive-get copied WAL file %s, prefetch state: %u/%u",
1126-
wal_file_name, n_files_in_prefetch, batch_size);
1125+
elog(INFO, "%s archive-get copied WAL file %s, prefetch state: %u/%u",
1126+
PROGRAM_NAME, wal_file_name, n_files_in_prefetch, batch_size);
11271127
goto get_done;
11281128
}
11291129
// else
@@ -1154,7 +1154,7 @@ do_archive_get(InstanceState *instanceState, InstanceConfig *instance, const cha
11541154
if (get_wal_file(wal_file_name, backup_wal_file_path, absolute_wal_file_path, false))
11551155
{
11561156
fail_count = 0;
1157-
elog(LOG, "pg_probackup archive-get copied WAL file %s", wal_file_name);
1157+
elog(LOG, "%s archive-get copied WAL file %s", PROGRAM_NAME, wal_file_name);
11581158
n_fetched++;
11591159
break;
11601160
}
@@ -1182,11 +1182,11 @@ do_archive_get(InstanceState *instanceState, InstanceConfig *instance, const cha
11821182
pretty_time_interval(get_time, pretty_time_str, 20);
11831183

11841184
if (fail_count == 0)
1185-
elog(INFO, "pg_probackup archive-get completed successfully, fetched: %i/%i, time elapsed: %s",
1186-
n_fetched, batch_size, pretty_time_str);
1185+
elog(INFO, "%s archive-get completed successfully, fetched: %i/%i, time elapsed: %s",
1186+
PROGRAM_NAME, n_fetched, batch_size, pretty_time_str);
11871187
else
1188-
elog(ERROR, "pg_probackup archive-get failed to deliver WAL file: %s, time elapsed: %s",
1189-
wal_file_name, pretty_time_str);
1188+
elog(ERROR, "%s archive-get failed to deliver WAL file: %s, time elapsed: %s",
1189+
PROGRAM_NAME, wal_file_name, pretty_time_str);
11901190
}
11911191

11921192
/*

src/backup.c

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#include "utils/thread.h"
2525
#include "utils/file.h"
2626

27-
//const char *progname = "pg_probackup";
28-
2927
/* list of files contained in backup */
3028
parray *backup_files_list = NULL;
3129

@@ -126,8 +124,8 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn,
126124

127125
/* notify start of backup to PostgreSQL server */
128126
time2iso(label, lengthof(label), current.start_time, false);
129-
strncat(label, " with pg_probackup", lengthof(label) -
130-
strlen(" with pg_probackup"));
127+
strncat(label, " with pg_backup", lengthof(label) -
128+
strlen(" with pg_backup"));
131129

132130
/* Call pg_start_backup function in PostgreSQL connect */
133131
pg_start_backup(label, smooth_checkpoint, &current, nodeInfo, backup_conn);
@@ -187,10 +185,11 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn,
187185
if (prev_backup)
188186
{
189187
if (parse_program_version(prev_backup->program_version) > parse_program_version(PROGRAM_VERSION))
190-
elog(ERROR, "pg_probackup binary version is %s, but backup %s version is %s. "
191-
"pg_probackup do not guarantee to be forward compatible. "
192-
"Please upgrade pg_probackup binary.",
193-
PROGRAM_VERSION, backup_id_of(prev_backup), prev_backup->program_version);
188+
elog(ERROR, "%s binary version is %s, but backup %s version is %s. "
189+
"%s do not guarantee to be forward compatible. "
190+
"Please upgrade %s binary.",
191+
PROGRAM_NAME, PROGRAM_VERSION, backup_id_of(prev_backup),
192+
prev_backup->program_version, PROGRAM_NAME, PROGRAM_NAME);
194193

195194
elog(INFO, "Parent backup: %s", backup_id_of(prev_backup));
196195

@@ -314,7 +313,7 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn,
314313

315314
if (parray_num(backup_files_list) < 100)
316315
elog(ERROR, "PGDATA is almost empty. Either it was concurrently deleted or "
317-
"pg_probackup do not possess sufficient permissions to list PGDATA content");
316+
"%s do not possess sufficient permissions to list PGDATA content", PROGRAM_NAME);
318317

319318
current.pgdata_bytes += calculate_datasize_of_filelist(backup_files_list);
320319
pretty_size(current.pgdata_bytes, pretty_bytes, lengthof(pretty_bytes));
@@ -677,12 +676,12 @@ pgdata_basic_setup(ConnectionOptions conn_opt, PGNodeInfo *nodeInfo)
677676
"Data block corruption will be detected");
678677
else
679678
elog(WARNING, "This PostgreSQL instance was initialized without data block checksums. "
680-
"pg_probackup have no way to detect data block corruption without them. "
681-
"Reinitialize PGDATA with option '--data-checksums'.");
679+
"%s have no way to detect data block corruption without them. "
680+
"Reinitialize PGDATA with option '--data-checksums'.", PROGRAM_NAME);
682681

683682
if (nodeInfo->is_superuser)
684683
elog(WARNING, "Current PostgreSQL role is superuser. "
685-
"It is not recommended to run pg_probackup under superuser.");
684+
"It is not recommended to run %s under superuser.", PROGRAM_NAME);
686685

687686
strlcpy(current.server_version, nodeInfo->server_version_str,
688687
sizeof(current.server_version));
@@ -691,7 +690,7 @@ pgdata_basic_setup(ConnectionOptions conn_opt, PGNodeInfo *nodeInfo)
691690
}
692691

693692
/*
694-
* Entry point of pg_probackup BACKUP subcommand.
693+
* Entry point of pg_backup BACKUP subcommand.
695694
*
696695
* if start_time == INVALID_BACKUP_ID then we can generate backup_id
697696
*/
@@ -777,9 +776,9 @@ do_backup(InstanceState *instanceState, pgSetBackupParams *set_backup_params,
777776
current.compress_alg = instance_config.compress_alg;
778777
current.compress_level = instance_config.compress_level;
779778

780-
elog(INFO, "Backup start, pg_probackup version: %s, instance: %s, backup ID: %s, backup mode: %s, "
779+
elog(INFO, "Backup start, %s version: %s, instance: %s, backup ID: %s, backup mode: %s, "
781780
"wal mode: %s, remote: %s, compress-algorithm: %s, compress-level: %i",
782-
PROGRAM_VERSION, instanceState->instance_name, backup_id_of(&current), pgBackupGetBackupMode(&current, false),
781+
PROGRAM_NAME, PROGRAM_VERSION, instanceState->instance_name, backup_id_of(&current), pgBackupGetBackupMode(&current, false),
783782
current.stream ? "STREAM" : "ARCHIVE", IsSshProtocol() ? "true" : "false",
784783
deparse_compress_alg(current.compress_alg), current.compress_level);
785784

@@ -1433,9 +1432,9 @@ wait_wal_lsn(const char *wal_segment_dir, XLogRecPtr target_lsn, bool is_start_l
14331432
}
14341433

14351434
if (!current.stream && is_start_lsn && try_count == 30)
1436-
elog(WARNING, "By default pg_probackup assume WAL delivery method to be ARCHIVE. "
1435+
elog(WARNING, "By default %s assume WAL delivery method to be ARCHIVE. "
14371436
"If continuous archiving is not set up, use '--stream' option to make autonomous backup. "
1438-
"Otherwise check that continuous archiving works correctly.");
1437+
"Otherwise check that continuous archiving works correctly.", PROGRAM_NAME);
14391438

14401439
if (timeout > 0 && try_count > timeout)
14411440
{
@@ -1609,7 +1608,7 @@ pg_create_restore_point(PGconn *conn, time_t backup_start_time)
16091608
const char *params[1];
16101609
char name[1024];
16111610

1612-
snprintf(name, lengthof(name), "pg_probackup, backup_id %s",
1611+
snprintf(name, lengthof(name), "pg_backup, backup_id %s",
16131612
base36enc(backup_start_time));
16141613
params[0] = name;
16151614

src/catchup.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ catchup_init_state(PGNodeInfo *source_node_info, const char *source_pgdata, cons
7373
current.tli = get_current_timeline_from_control(source_pgdata, FIO_DB_HOST, false);
7474
#endif
7575

76-
elog(INFO, "Catchup start, pg_probackup version: %s, "
76+
elog(INFO, "Catchup start, %s version: %s, "
7777
"PostgreSQL version: %s, "
7878
"remote: %s, source-pgdata: %s, destination-pgdata: %s",
79-
PROGRAM_VERSION, source_node_info->server_version_str,
79+
PROGRAM_NAME, PROGRAM_VERSION, source_node_info->server_version_str,
8080
IsSshProtocol() ? "true" : "false",
8181
source_pgdata, dest_pgdata);
8282

@@ -613,7 +613,7 @@ filter_filelist(parray *filelist, const char *pgdata,
613613
}
614614

615615
/*
616-
* Entry point of pg_probackup CATCHUP subcommand.
616+
* Entry point of pg_backup CATCHUP subcommand.
617617
* exclude_*_paths_list are parray's of char *
618618
*/
619619
int
@@ -691,8 +691,8 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
691691
char label[1024];
692692
/* notify start of backup to PostgreSQL server */
693693
time2iso(label, lengthof(label), current.start_time, false);
694-
strncat(label, " with pg_probackup", lengthof(label) -
695-
strlen(" with pg_probackup"));
694+
strncat(label, " with pg_backup", lengthof(label) -
695+
strlen(" with pg_backup"));
696696

697697
/* Call pg_start_backup function in PostgreSQL connect */
698698
pg_start_backup(label, smooth_checkpoint, &current, &source_node_info, source_conn);

src/checkdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*-------------------------------------------------------------------------
22
*
33
* src/checkdb.c
4-
* pg_probackup checkdb subcommand
4+
* pg_backup checkdb subcommand
55
*
66
* It allows to validate all data files located in PGDATA
77
* via block checksums matching and page header sanity checks.
@@ -733,7 +733,7 @@ do_amcheck(ConnectionOptions conn_opt, PGconn *conn)
733733
"All databases were amchecked.");
734734
}
735735

736-
/* Entry point of pg_probackup CHECKDB subcommand */
736+
/* Entry point of pg_backup CHECKDB subcommand */
737737
void
738738
do_checkdb(bool need_amcheck,
739739
ConnectionOptions conn_opt, char *pgdata)

0 commit comments

Comments
 (0)