Re: Any chance to pg_dump UDD partially (Was: Any chance to reduce size of bugs.d.o mirror for UDD import)
On 14/05/12 at 23:03 +0200, Andreas Tille wrote:
> Hi,
>
> it seems a fully bugs.debian.org mirror is necessary to update the bug*
> tables inside UDD. Because this is not really applicable here in the
> long run I wonder whether I could use pg_dump / pg_restore from original
> UDD.
>
> I thought about something like:
>
>
> #!/bin/sh
>
> GETFROMHOST=udd.debian.org
> TABLES="bugs \
> bugs_blockedby \
> bugs_blocks \
> bugs_fixed_in \
> bugs_found_in \
> bugs_merged_with \
> bugs_packages \
> bugs_tags \
> bugs_usertags"
>
> for tab in $TABLES ; do
> psql udd -c "DROP TABLE IF EXISTS ${tab};"
> ssh $GETFROMHOST "pg_dump --no-owner --format=custom --table ${tab} udd | bzip2" | \
> bunzip2 | \
> pg_restore --no-owner --format=custom --table ${tab} --dbname=udd
> done
>
>
>
> I have no idea whether this is advisable regarding performance of UDD
> host. In any case it does not work like this because a normal user
> can not "psql udd" but rather needs to sudo into user udd. I do not
> really consider it a good idea to do this via
>
> psql service=udd
>
> from alioth because having just another host on another continent
> inbetween just for permission issues sounds crazy. In short: Do you
> see a reasonable way for a pg_dump - pg_restore path from udd.debian.org
> to an UDD clone.
I don't see anything fundamentally unreasonable about what you are
proposing.
Lucas
Reply to: