title: PostgreSQL Streaming Replication ubuntu commands to windows
body: <p>I'm trying out this tutorial which is made for linux postgresql server. I followed the configuration set ups but I dont know how to translate this command in windows. Also, whats the equivalent of /etc folder and /var folder in windows installation of postgres?</p>
  
  <pre><code>echo Stopping PostgreSQL
  sudo service postgresql stop
  
  echo Cleaning up old cluster directory
  sudo -u postgres rm -rf /var/lib/postgresql/9.2/main
  
  echo Starting base backup as replicator
  sudo -u postgres pg_basebackup -h 1.2.3.4 -D /var/lib/postgresql/9.2/main -U 
  replicator -v -P
  
  echo Writing recovery.conf file
  sudo -u postgres bash -c "cat &gt; /var/lib/postgresql/9.2/main/recovery.conf 
  &lt;&lt;- _EOF1_
  standby_mode = 'on'
  primary_conninfo = 'host=1.2.3.4 port=5432 user=replicator 
  password=thepassword sslmode=require'
  trigger_file = '/tmp/postgresql.trigger'
  _EOF1_"
  
  echo Startging PostgreSQL
  sudo service postgresql start
  </code></pre>
  
  <p>The full tutorial is <a href="http://www.rassoc.com/gregr/weblog/2013/02/16/zero-to-postgresql-streaming-replication-in-10-mins/" rel="nofollow noreferrer">here</a></p>