master (somerset):
postgres=# SELECT pg_start_backup('replication', true, false);
pg_start_backup
-----------------
1620/5D000028
(1 row)
postgres=# select * from pg_stop_backup(false, false);
lsn | labelfile | spcmapfile
---------------+-------------------------------------------------------------------+------------
1625/772A8B40 | START WAL LOCATION: 1620/5D000028 (file 00000001000016200000005D)+|
| CHECKPOINT LOCATION: 1620/5D000060 +|
| BACKUP METHOD: streamed +|
| BACKUP FROM: master +|
| START TIME: 2018-06-19 09:53:36 UTC +|
| LABEL: replication +|
| |
(1 row)
Data directory whereabouts (master, connected to db to replicate):
```
postgres=# show data_directory;
data_directory
-------------------------------------------
/srv/softwareheritage/postgres/10/indexer
(1 row)
```
Edit backup_label in the data directory:
```
postgres@dbreplica1:/srv/softwareheritage/postgres/10/indexer$ cat backup_label
START WAL LOCATION: 1620/5D000028 (file 00000001000016200000005D)
CHECKPOINT LOCATION: 1620/5D000060
BACKUP METHOD: streamed
BACKUP FROM: master
START TIME: 2018-06-19 09:53:36 UTC
LABEL: replication
```
Touch tablespace_map
```
postgres@dbreplica1:/srv/softwareheritage/postgres/10/indexer$ touch tablespace_map
postgres@dbreplica1:/srv/softwareheritage/postgres/10/indexer$ cat tablespace_map
postgres@dbreplica1:/srv/softwareheritage/postgres/10/indexer$
```