title: pg_basebackup: directory "/var/lib/pgsql/9.3/data" exists but is not empty
body: <p>I am trying to build a HA two node cluster with pacemaker and corosync for postgresql-9.3. I am using the link below as my guide.</p>
  
  <blockquote>
    <p><a href="http://kb.techtaco.org/#!linux/postgresql/building_a_highly_available_multi-node_cluster_with_pacemaker_&amp;_corosync.md" rel="nofollow noreferrer">http://kb.techtaco.org/#!linux/postgresql/building_a_highly_available_multi-node_cluster_with_pacemaker_&amp;_corosync.md</a></p>
  </blockquote>
  
  <p>However, I cannot get pass to the part where I need do pg_basebackup as shown below.</p>
  
  <blockquote>
    <p>[root@TKS-PSQL01 ~]# runuser -l postgres -c 'pg_basebackup -D
    /var/lib/pgsql/9.3/data -l <code>date +"%m-%d-%y"</code>_initial_cloning -P -h
    TKS-PSQL02 -p 5432 -U replicator -W -X stream' pg_basebackup:
    directory "/var/lib/pgsql/9.3/data" exists but is not empty</p>
  </blockquote>
  
  <p>/var/lib/pgsql/9.3/data in TKS-PSQL02 is confirmed empty.</p>
  
  <blockquote>
    <p>[root@TKS-PSQL02 9.3]# ls -l /var/lib/pgsql/9.3/data/ total 0</p>
  </blockquote>
  
  <p>Any idea why I am getting such error? And is there any better way to do Postgresql HA? Note: I am not using shared storage for the database so I could not proceed with Redhat clustering.</p>
  
  <p>Appreciate all the answers in advance.</p>