Thu Apr 6 13:38:55 PDT 2006
- Previous message: [Slony1-general] Backup of slave nodes?
- Next message: [Slony1-general] about triggers in slave db
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4/6/2006 4:15 PM, F.Sluiter wrote: > Thank you for the answer. > > So if I understand correctly I would dump the slave databases in two steps: > first schema only and then only the data that is not shared. You cannot dump the schema of replicated tables on a subscriber. Only the data. You must obtain the schema of replicated tables on their origin. This should not be a problem since the schema is unlikely to change that much. Otherwise you would have some severe headaches with Slony anyway. > > Restoring is: > restore schema's and subscribe the node. wait untill it is in sync and > then load the data. ... then load the "non-shared" data only. The "shared" data has been restored by the subscribe. > > Three more questions then, hope you don't mind: > 1 Is the schema dump from a running slave usable for recreation, or do > I need to filter out the slony stuff from this schema only dump? The schema dump of a subscriber is possibly damaged for subscribed tables. Take a look at the script in the tools directory that can extract a clean schema from a "master" node to get an idea how to get those tables schema. This is another reason to separate the shared and private parts into separate schemas. pg_dump can dump a single schema. > 2. Is there any way of automating this? I have found the -l and -L > option of pg_restore, but I couldn't find a similar option for > pg_dump. There is a way for everything to automate it. Look for the pg_dump option -s. > 3. Should I use slony1_dump.sh for this datadump of the slave? I suggest you write your own scripts for that. This is a case I have not seen before and I doubt that any out of the box tools coming with slony are even written with that in mind, let alone being tested for use in this context. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck at Yahoo.com #
- Previous message: [Slony1-general] Backup of slave nodes?
- Next message: [Slony1-general] about triggers in slave db
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list