<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Howto Backup PostgreSQL Databases Server With pg_dump command</title>
	<atom:link href="http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html</link>
	<description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description>
	<lastBuildDate>Fri, 19 Mar 2010 02:53:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: nihed</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-153030</link>
		<dc:creator>nihed</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:09:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-153030</guid>
		<description>Nice, 
For my case, I add split to have many files and can store it in dumy filesystem
&lt;code&gt;pg_dumpall -Upostgres &#124; gzip -c &#124; split --bytes=1000m &lt;/code&gt;


Regards</description>
		<content:encoded><![CDATA[<p>Nice,<br />
For my case, I add split to have many files and can store it in dumy filesystem<br />
<code>pg_dumpall -Upostgres | gzip -c | split --bytes=1000m </code></p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brahma Prakash Tiwari</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-151507</link>
		<dc:creator>Brahma Prakash Tiwari</dc:creator>
		<pubDate>Fri, 06 Nov 2009 10:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-151507</guid>
		<description>Hi Denial this script is great for me -Brahma Prakash</description>
		<content:encoded><![CDATA[<p>Hi Denial this script is great for me -Brahma Prakash</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-150612</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 11 Sep 2009 16:40:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-150612</guid>
		<description>Hi. I had a slightly different experience. My cron job runs under root, but wanted to run the psql code under postgres user. My script therefore had to be changed to (Note the PGPASSWORD being set AND removed at the end):

#!/bin/bash
export PGPASSWORD=XXXXX
DIR=/home/ben/backups/psql
[ !$DIR ] &amp;&amp; mkdir -p $DIR &#124;&#124; :
LIST=$(su postgres -c &quot;psql -lt&quot; &#124;awk &#039;{ print $1}&#039; &#124;grep -vE &#039;^-&#124;^List&#124;^Name&#124;template[0&#124;1]&#039;)
for d in $LIST
do
  pg_dump -U postgres $d &#124; gzip -c &gt;  $DIR/$d.out.gz
done
export PGPASSWORD=</description>
		<content:encoded><![CDATA[<p>Hi. I had a slightly different experience. My cron job runs under root, but wanted to run the psql code under postgres user. My script therefore had to be changed to (Note the PGPASSWORD being set AND removed at the end):</p>
<p>#!/bin/bash<br />
export PGPASSWORD=XXXXX<br />
DIR=/home/ben/backups/psql<br />
[ !$DIR ] &amp;&amp; mkdir -p $DIR || :<br />
LIST=$(su postgres -c &#8220;psql -lt&#8221; |awk &#8216;{ print $1}&#8217; |grep -vE &#8216;^-|^List|^Name|template[0|1]&#8216;)<br />
for d in $LIST<br />
do<br />
  pg_dump -U postgres $d | gzip -c &gt;  $DIR/$d.out.gz<br />
done<br />
export PGPASSWORD=</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamidreza Zarei</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-149692</link>
		<dc:creator>Hamidreza Zarei</dc:creator>
		<pubDate>Sun, 26 Jul 2009 07:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-149692</guid>
		<description>Hi
I want take backup from Postgresql in Tehran (city in Iran) and store it in Sqlserver 2005 in Mashad (city in Iran). Is it possible? How can I do it?
Regards,
Hamidreza</description>
		<content:encoded><![CDATA[<p>Hi<br />
I want take backup from Postgresql in Tehran (city in Iran) and store it in Sqlserver 2005 in Mashad (city in Iran). Is it possible? How can I do it?<br />
Regards,<br />
Hamidreza</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Sircy</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-149418</link>
		<dc:creator>Joe Sircy</dc:creator>
		<pubDate>Thu, 09 Jul 2009 17:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-149418</guid>
		<description>Nice tip, thanks. I have a few notes to share.

You can also avoid the number of rows returned with the &quot;-t&quot; option to psql:

psql -lt

Also, to run the script as root from cron, I used su to run the backup as the postgres user.  My complete script:
&lt;pre&gt;
#!/bin/sh
DIR=/backup/pgsql

LIST=$(su - postgres -c &quot;psql -lt&quot; &#124;awk &#039;{ print $1}&#039; &#124;grep -vE &#039;^-&#124;^List&#124;^Name&#124;template[0&#124;1]&#039;)

for d in $LIST
do
  su - postgres -c &quot;/usr/bin/pg_dump $d &#124; gzip -c &gt; $DIR/$d.sql.gz&quot;
done
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Nice tip, thanks. I have a few notes to share.</p>
<p>You can also avoid the number of rows returned with the &#8220;-t&#8221; option to psql:</p>
<p>psql -lt</p>
<p>Also, to run the script as root from cron, I used su to run the backup as the postgres user.  My complete script:</p>
<pre>
#!/bin/sh
DIR=/backup/pgsql

LIST=$(su - postgres -c "psql -lt" |awk '{ print $1}' |grep -vE '^-|^List|^Name|template[0|1]')

for d in $LIST
do
  su - postgres -c "/usr/bin/pg_dump $d | gzip -c &gt; $DIR/$d.sql.gz"
done
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: subodh keskar</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-147989</link>
		<dc:creator>subodh keskar</dc:creator>
		<pubDate>Sun, 05 Apr 2009 06:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-147989</guid>
		<description>Needed help,new person in software using POSTGRE SQL please guide me with commands that will help to take backup easily and similarly restore when needed.</description>
		<content:encoded><![CDATA[<p>Needed help,new person in software using POSTGRE SQL please guide me with commands that will help to take backup easily and similarly restore when needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Basavaraj</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-145059</link>
		<dc:creator>Basavaraj</dc:creator>
		<pubDate>Sat, 20 Sep 2008 12:27:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-145059</guid>
		<description>i have taken backup of DB from other machine. so i want the run those DB on my box. 

what are the steps i need to follow to achive it.

please help me</description>
		<content:encoded><![CDATA[<p>i have taken backup of DB from other machine. so i want the run those DB on my box. </p>
<p>what are the steps i need to follow to achive it.</p>
<p>please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-144207</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Sat, 28 Jun 2008 15:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-144207</guid>
		<description>Thanks Vivek for the great script.

Just a few notes:

In the 3rd line 
[ ! $DIR ] &amp;&amp; mkdir -p $DIR &#124;&#124; :
there should be no space character after the exclamation mark!
[ !$DIR ] &amp;&amp; mkdir -p $DIR &#124;&#124; :
like this it works for me.

@Leopold, thanks for your comment, I had the same problem and your expression for LIST was the solution :)</description>
		<content:encoded><![CDATA[<p>Thanks Vivek for the great script.</p>
<p>Just a few notes:</p>
<p>In the 3rd line<br />
[ ! $DIR ] &amp;&amp; mkdir -p $DIR || :<br />
there should be no space character after the exclamation mark!<br />
[ !$DIR ] &amp;&amp; mkdir -p $DIR || :<br />
like this it works for me.</p>
<p>@Leopold, thanks for your comment, I had the same problem and your expression for LIST was the solution :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leopold Palomo</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-143962</link>
		<dc:creator>Leopold Palomo</dc:creator>
		<pubDate>Wed, 04 Jun 2008 19:37:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-143962</guid>
		<description>The script has a little bug. On,
LIST=$(psql -l &#124; awk &#039;{ print $1}&#039; &#124; grep -vE &#039;^-&#124;^List&#124;^Name&#124;template[0&#124;1]&#039;)

if you have a list with several databases, the last row is number. For example in my case:
(19 rows)
and after the script 
(19

so I propose you generate the LIST with this:
LIST=$(psql -l &#124; awk &#039;{ print $1}&#039; &#124; grep -vE &#039;^-&#124;^List&#124;^Name&#124;template[0&#124;1]&#124;^\(&#039;)

Otherwise, it&#039;s a very nice article.

Thanks.</description>
		<content:encoded><![CDATA[<p>The script has a little bug. On,<br />
LIST=$(psql -l | awk &#8216;{ print $1}&#8217; | grep -vE &#8216;^-|^List|^Name|template[0|1]&#8216;)</p>
<p>if you have a list with several databases, the last row is number. For example in my case:<br />
(19 rows)<br />
and after the script<br />
(19</p>
<p>so I propose you generate the LIST with this:<br />
LIST=$(psql -l | awk &#8216;{ print $1}&#8217; | grep -vE &#8216;^-|^List|^Name|template[0|1]|^\(&#8216;)</p>
<p>Otherwise, it&#8217;s a very nice article.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-143368</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 03 Apr 2008 12:37:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-143368</guid>
		<description>Man, please remember that if you use the gzip option with pg_dumpall you HAVE TO use the gunzip to restore the backup.

gunzip all.dbs.out.gz 

and then

psql -f all.dbs.out postgres</description>
		<content:encoded><![CDATA[<p>Man, please remember that if you use the gzip option with pg_dumpall you HAVE TO use the gunzip to restore the backup.</p>
<p>gunzip all.dbs.out.gz </p>
<p>and then</p>
<p>psql -f all.dbs.out postgres</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yogesh</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-140258</link>
		<dc:creator>Yogesh</dc:creator>
		<pubDate>Wed, 20 Jun 2007 07:25:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-140258</guid>
		<description>can you provide how to do offiline backup of the postgresql database.</description>
		<content:encoded><![CDATA[<p>can you provide how to do offiline backup of the postgresql database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toine; &#187; Blog Archive &#187; del.icio.us (February 10th)</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-71815</link>
		<dc:creator>toine; &#187; Blog Archive &#187; del.icio.us (February 10th)</dc:creator>
		<pubDate>Sun, 11 Feb 2007 00:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-71815</guid>
		<description>[...] Howto Backup PostgreSQL Databases &#124; nixCraft &#8211; [...]</description>
		<content:encoded><![CDATA[<p>[...] Howto Backup PostgreSQL Databases | nixCraft &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilesh Jain</title>
		<link>http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-22830</link>
		<dc:creator>Nilesh Jain</dc:creator>
		<pubDate>Fri, 03 Nov 2006 08:29:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html#comment-22830</guid>
		<description>sir,
i am not able to take the backup of postgresql database.in pg_dump commnad it provide me &quot;access denied &quot;
thanks</description>
		<content:encoded><![CDATA[<p>sir,<br />
i am not able to take the backup of postgresql database.in pg_dump commnad it provide me &#8220;access denied &#8221;<br />
thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.197 seconds -->
<!-- Cached page served by WP-Cache -->
