Skip to content

Commit 2fd0dda

Browse files
author
Viktoria Shepard
committed
Print remote host
1 parent dffc2b2 commit 2fd0dda

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/restore.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ do_restore_or_validate(InstanceState *instanceState, time_t target_backup_id, pg
131131
bool cleanup_pgdata = false;
132132
bool backup_has_tblspc = true; /* backup contain tablespace */
133133
XLogRecPtr shift_lsn = InvalidXLogRecPtr;
134+
char timestamp[100];
134135

135136
if (instanceState == NULL)
136137
elog(ERROR, "Required parameter not specified: --instance");
@@ -687,6 +688,12 @@ do_restore_or_validate(InstanceState *instanceState, time_t target_backup_id, pg
687688
backup_id_of(dest_backup),
688689
dest_backup->server_version);
689690

691+
time2iso(timestamp, lengthof(timestamp), dest_backup->start_time, false);
692+
if (instance_config.remote.host)
693+
elog(INFO, "Restoring the database from the backup starting at %s on %s", timestamp, instance_config.remote.host);
694+
else
695+
elog(INFO, "Restoring the database from the backup starting at %s", timestamp);
696+
690697
restore_chain(dest_backup, parent_chain, dbOid_exclude_list, params,
691698
instance_config.pgdata, no_sync, cleanup_pgdata, backup_has_tblspc);
692699

@@ -720,7 +727,6 @@ restore_chain(pgBackup *dest_backup, parray *parent_chain,
720727
bool backup_has_tblspc)
721728
{
722729
int i;
723-
char timestamp[100];
724730
parray *pgdata_files = NULL;
725731
parray *dest_files = NULL;
726732
parray *external_dirs = NULL;
@@ -743,9 +749,6 @@ restore_chain(pgBackup *dest_backup, parray *parent_chain,
743749
time_t start_time, end_time;
744750

745751
/* Preparations for actual restoring */
746-
time2iso(timestamp, lengthof(timestamp), dest_backup->start_time, false);
747-
elog(INFO, "Restoring the database from backup at %s", timestamp);
748-
749752
dest_files = get_backup_filelist(dest_backup, true);
750753

751754
/* Lock backup chain and make sanity checks */

tests/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# git+https://github.com/postgrespro/testgres.git@<git-ref>
66
# 3. From a local directory
77
# /path/to/local/directory/testgres
8-
git+https://github.com/postgrespro/testgres.git@master#egg=testgres-pg_probackup2&subdirectory=testgres/plugins/pg_probackup2
8+
git+https://github.com/postgrespro/testgres.git@archive-command-exec#egg=testgres-pg_probackup2&subdirectory=testgres/plugins/pg_probackup2
99
allure-pytest
1010
deprecation
1111
pexpect
12-
pytest
12+
pytest==7.4.3
1313
pytest-xdist

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy