From 94e3e7693d5d14d8b4d35fa26d6198fe8a9faecc Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 31 Jan 2007 16:13:44 +0000 Subject: [PATCH] Dumps the planetlab3 database on zulu, fixing a few things on the way --- tools/planetlab3_dump.sh | 119 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100755 tools/planetlab3_dump.sh diff --git a/tools/planetlab3_dump.sh b/tools/planetlab3_dump.sh new file mode 100755 index 0000000..e6a86e3 --- /dev/null +++ b/tools/planetlab3_dump.sh @@ -0,0 +1,119 @@ +#!/bin/bash +# +# Dumps the planetlab3 database on zulu, fixing a few things on the way +# +# Mark Huang +# Copyright (C) 2007 The Trustees of Princeton University +# +# $Id$ +# + +tables=( +node_bootstates +nodes +nodenetworks +node_nodenetworks +nodegroups +nodegroup_nodes +override_bootscripts +pod_hash +conf_file +conf_assoc +address_types +addresses +organizations +sites +roles +capabilities +persons +person_roles +person_capabilities +person_address +key_types +keys +person_keys +person_site +node_root_access +authorized_subnets +site_authorized_subnets +event_classes +dslice03_states +dslice03_attributetypes +dslice03_slices +dslice03_attributes +dslice03_sliceattribute +dslice03_slicenode +dslice03_sliceuser +dslice03_siteinfo +pcu +pcu_ports +join_request +whatsnew +node_hostnames +blacklist +dslice03_initscripts +dslice03_defaultattribute +peered_mas +sessions +) + +# Dump tables +for table in "${tables[@]}" ; do + pg_dump -U postgres -t $table planetlab3 +done | + +# Do some manual cleanup +sed -f <(cat <