Converting Copy to insert statement in backup file
От | Chris Preston |
---|---|
Тема | Converting Copy to insert statement in backup file |
Дата | |
Msg-id | 200807101540.m6AFeA3T025524@mail2.trafalgar.lan обсуждение исходный текст |
Ответы |
Re: Converting Copy to insert statement in backup file
|
Список | pgsql-sql |
<div class="Section1"><p class="MsoNormal"><span class="postbody1"><font face="Verdana" size="1"><span style="font-size:9.0pt;font-family:Verdana">Hello,</span></font></span><pclass="MsoNormal"><span class="postbody1"><fontface="Verdana" size="1"><span style="font-size:9.0pt;font-family:Verdana">I have a backup cron job(shown below) but its too big and there are times that I want to just cut out from the text file certain areas to restoredata in a specific table… Looking in the file, I notice there is a “copy” command.. Someone told me that there was a parameter that I could use to convert the copy to insert so I could easily cut it out of the file and run it on itsown ..Any ideas </span></font></span><p class="MsoNormal"><span class="postbody1"><font face="Verdana" size="1"><spanstyle="font-size:9.0pt;font-family:Verdana"> </span></font></span><p class="MsoNormal"><span class="postbody1"><fontface="Verdana" size="1"><span style="font-size:9.0pt;font-family:Verdana">su -c '/usr/bin/pg_dump-U postgres -o -C ttms |gzip > /home/hrd/ttmsqltrams/sqlbackup.gz' postgres</span></font></span><fontface="Arial" size="2"><span style="font-size:10.0pt;font-family:Arial"></span></font></div>
В списке pgsql-sql по дате отправления: