From e58ef0faa49612f1567b0544f5f6d723ac886fa6 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 26 May 2011 17:15:11 +0000 Subject: [PATCH] add support for site.skiptables attribute git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9692 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/sbin/dumpxCATdb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-client/sbin/dumpxCATdb b/xCAT-client/sbin/dumpxCATdb index 1056e7a3e..818622dea 100644 --- a/xCAT-client/sbin/dumpxCATdb +++ b/xCAT-client/sbin/dumpxCATdb @@ -40,6 +40,9 @@ if ($::RUNCMD_RC != 0) "Error running tabdump to get list of tables"); exit 1; } +# read tables to skip during dump from site.skiptables attribute +my @skiptbls=xCAT::Utils->get_site_attribute('skiptables'); + foreach my $table (@output) { # if not -a request , skip eventlog and auditlog @@ -56,8 +59,14 @@ foreach my $table (@output) } next; } + # skip and table in the site.skiptables attribute + if (grep(/^$table$/, @skiptbls)) { + if ($::DUMPVERBOSE) { + xCAT::MsgUtils->message("I", "Skipping $table\n"); + } + next; + } - #$cmd = "tabdump $table > $::PATH/$table.csv"; $cmd = "tabdump -f $::PATH/$table.csv $table"; my @errout = xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0)