What does pg_basebackup do?
<p>I perform some steps to do PITR by referring <a href="https://opensourcedbms.com/dbms/how-to-do-point-in-time-recovery-with-postgresql-9-2-pitr-3/" rel="nofollow">https://opensourcedbms.com/dbms/how-to-do-point-in-time-recovery-with-postgresql-9-2-pitr-3/</a> site.</p>

<p>I would like to know what pg_basebackup actually does? I want to know, what Postgres does? Some times I notice <code>000000010000000000000006.000000D0.backup</code> files are created in pg_xlog directory. Its content is as:</p>

<pre><code>START WAL LOCATION: 0/60000D0 (file 000000010000000000000006)
STOP WAL LOCATION: 0/60001D8 (file 000000010000000000000006)
CHECKPOINT LOCATION: 0/6000108
BACKUP METHOD: pg_start_backup
BACKUP FROM: master
START TIME: 2016-10-01 15:10:52 IST
LABEL: myBaseBackupByPgStartBackup
STOP TIME: 2016-10-01 15:15:42 IST
</code></pre>

<p>I want to know its functionality and what it does internally whenever we perform <code>pg_basebackup</code>?</p>