diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 666fa37..69bdcd6 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -76,8 +76,6 @@ extern uint32 bootstrap_data_checksum_version;
 /* File path names (all relative to $PGDATA) */
 #define RECOVERY_COMMAND_FILE	"recovery.conf"
 #define RECOVERY_COMMAND_DONE	"recovery.done"
-#define PROMOTE_SIGNAL_FILE		"promote"
-#define FALLBACK_PROMOTE_SIGNAL_FILE "fallback_promote"
 
 
 /* User-settable parameters */
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index 1e86e4c..b3d0498 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -911,6 +911,15 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces,
 			continue;
 
 		/*
+		 * Skip promote signal files. Those files may have been created by
+		 * pg_ctl to trigger a promotion but they do not belong to a base
+		 * backup.
+		 */
+		if (strcmp(de->d_name, PROMOTE_SIGNAL_FILE) == 0 ||
+			strcmp(de->d_name, FALLBACK_PROMOTE_SIGNAL_FILE) == 0)
+			continue;
+
+		/*
 		 * Check if the postmaster has signaled us to exit, and abort with an
 		 * error in that case. The error handler further up will call
 		 * do_pg_abort_backup() for us. Also check that if the backup was
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index fbf9324..9de8d75 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -132,6 +132,12 @@ typedef XLogLongPageHeaderData *XLogLongPageHeader;
 #define XLOG_CONTROL_FILE	"global/pg_control"
 
 /*
+ * Promote signal files (relative to $PGDATA)
+ */
+#define PROMOTE_SIGNAL_FILE				"promote"
+#define FALLBACK_PROMOTE_SIGNAL_FILE	"fallback_promote"
+
+/*
  * These macros encapsulate knowledge about the exact layout of XLog file
  * names, timeline history file names, and archive-status file names.
  */
