Thread
-
Specific objects backup in PostgreSQL
nikhil kumar <nikhil.dba97@gmail.com> — 2024-07-10T18:05:22Z
Dear Team, We received a request from client. They required all functions, stored procedures and triggers backup. can anyone please let me know. How to take backup only above objects. Thanks & Regards, Nikhil, PostgreSQL DBA.
-
Re: Specific objects backup in PostgreSQL
David G. Johnston <david.g.johnston@gmail.com> — 2024-07-10T18:41:01Z
On Wed, Jul 10, 2024 at 11:05 AM nikhil kumar <nikhil.dba97@gmail.com> wrote: > > We received a request from client. They required all functions, stored > procedures and triggers backup. can anyone please let me know. How to take > backup only above objects. > This hardly qualifies as a performance question. You might try the -general list if you want to brainstorm workarounds because pg_dump itself doesn't provide any command line options to give you this specific subset of your database. David J.
-
Re: Specific objects backup in PostgreSQL
Olivier Gautherot <ogautherot@gautherot.net> — 2024-07-10T18:42:49Z
Hi Nikhil, On Wed, Jul 10, 2024 at 8:05 PM nikhil kumar <nikhil.dba97@gmail.com> wrote: > Dear Team, > > We received a request from client. They required all functions, stored > procedures and triggers backup. can anyone please let me know. How to take > backup only above objects. > > > Thanks & Regards, > Nikhil, > PostgreSQL DBA. > "pg_dump -s" will export the model, including functions, triggers... as well as tables and views without data. I should have somewhere an old program I wrote on a lazy day to slice this backup into individual objects. I can dig it for you if you need it. Cheers -- Olivier Gautherot
-
Re: Specific objects backup in PostgreSQL
Anthony Sotolongo <asotolongo@gmail.com> — 2024-07-10T20:04:48Z
Hi Nikhil, maybe you can apply some tricks playing with pg_dump -s and pg_restore --list check this link: https://stackoverflow.com/a/13758324/8308381 Regards On 10-07-24 14:05, nikhil kumar wrote: > Dear Team, > > We received a request from client. They required all functions, stored > procedures and triggers backup. can anyone please let me know. How to > take backup only above objects. > > > Thanks & Regards, > Nikhil, > PostgreSQL DBA.
-
Re: Specific objects backup in PostgreSQL
nikhil kumar <nikhil.dba97@gmail.com> — 2024-07-11T03:29:50Z
Thank you everyone for your help On Thu, 11 Jul, 2024, 1:34 am Anthony Sotolongo, <asotolongo@gmail.com> wrote: > Hi Nikhil, maybe you can apply some tricks playing with pg_dump -s and > pg_restore --list > > > check this link: https://stackoverflow.com/a/13758324/8308381 > > > Regards > > On 10-07-24 14:05, nikhil kumar wrote: > > Dear Team, > > > > We received a request from client. They required all functions, stored > > procedures and triggers backup. can anyone please let me know. How to > > take backup only above objects. > > > > > > Thanks & Regards, > > Nikhil, > > PostgreSQL DBA. >