2008-02-14 14:25:49 +00:00
=head1 NAME
2008-03-05 16:49:19 +00:00
B<tabdump> - display an xCAT database table in CSV format.
2008-02-14 14:25:49 +00:00
=head1 SYNOPSIS
2008-03-05 16:49:19 +00:00
B<tabdump> [I<-d>] [I<table>]
2008-02-14 14:25:49 +00:00
2011-03-30 15:01:42 +00:00
B<tabdump> [I<table>]
2011-05-11 17:55:31 +00:00
B<tabdump> [I<-f> I<filename>] [I<table>]
2013-08-01 16:17:05 +00:00
B<tabdump> [I<-n> I<# of records>] [I<auditlog | eventlog>]
2011-03-30 15:01:42 +00:00
B<tabdump> [I<-w> I<attr>==I<val>] [B<-w> I<attr>=~I<val>] ...] [I<table>]
2011-05-11 17:55:31 +00:00
B<tabdump> [I<-w> I<attr>==I<val>] [B<-w> I<attr>=~I<val>] ...] [I<-f> I<filename>] [I<table>]
2011-03-30 15:01:42 +00:00
B<tabdump> [I<-v> | I<--version>]
2008-03-05 16:49:19 +00:00
B<tabdump> [I<-?> | I<-h> | I<--help>]
2008-02-14 14:25:49 +00:00
2011-03-30 15:01:42 +00:00
B<tabdump>
2008-02-14 14:25:49 +00:00
=head1 DESCRIPTION
2008-02-21 21:10:35 +00:00
The tabdump command displays the header and all the rows of the specified table in CSV (comma separated values) format.
2008-02-14 14:25:49 +00:00
Only one table can be specified. If no table is specified, the list of existing
tables will be displayed.
=head1 OPTIONS
2008-03-05 16:49:19 +00:00
=over 10
2008-02-21 21:10:35 +00:00
2008-03-05 16:49:19 +00:00
=item B<-?|-h|--help>
Display usage message.
=item B<-d>
Show descriptions of the tables, instead of the contents of the tables. If a table name is also specified, descriptions of the columns (attributes) of the table will be displayed. Otherwise, a summary of each table will be displayed.
2013-08-01 16:17:05 +00:00
=item B<-n>
Shows the most recent number of entries as supplied on the -n flag from the auditlog or eventlog table.
=item B<-f>
File name or path to file in which to dump the table. Without this the table is dumped
to stdout. Using the -f flag allows the table to be dumped one record at a time. If tables are very large, dumping to stdout can cause problems such as running out of memory.
2011-04-18 16:22:22 +00:00
=item B<-w> I<'attr==val'> B<-w> I<'attr=~val'> ...
2011-03-30 15:01:42 +00:00
2011-03-30 15:08:39 +00:00
Use one or multiple -w flags to specify the selection string that can be used to select particular rows of the table. See examples.
2011-03-30 15:01:42 +00:00
Operator descriptions:
2011-03-30 15:44:21 +00:00
2011-03-30 15:01:42 +00:00
== Select nodes where the attribute value is exactly this value.
!= Select nodes where the attribute value is not this specific value.
> Select nodes where the attribute value is greater than this specific value.
>= Select nodes where the attribute value is greater than or equal to this specific value.
< Select nodes where the attribute value is less than this specific value.
<= Select nodes where the attribute value is less than or equal to this specific value.
=~ Select nodes where the attribute value matches the SQL LIKE value.
!~ Select nodes where the attribute value matches the SQL NOT LIKE value.
2008-03-05 16:49:19 +00:00
=back
2008-02-14 14:25:49 +00:00
=head1 RETURN VALUE
2008-03-05 16:49:19 +00:00
=over 3
=item 0
The command completed successfully.
=item 1
An error has occurred.
2008-02-14 14:25:49 +00:00
2008-03-05 16:49:19 +00:00
=back
2008-02-14 14:25:49 +00:00
=head1 EXAMPLES
2008-03-05 16:49:19 +00:00
=over 2
2008-02-14 14:25:49 +00:00
2008-03-05 16:49:19 +00:00
=item *
2008-02-14 14:25:49 +00:00
2008-03-05 16:49:19 +00:00
To display the contents of the site table:
2008-02-14 14:25:49 +00:00
2011-04-21 18:19:55 +00:00
B<tabdump> B<site>
2008-02-18 15:57:25 +00:00
2008-03-05 16:49:19 +00:00
=item *
2011-03-30 15:01:42 +00:00
To display the contents of the nodelist table where the groups attribute is compute :
2011-04-21 18:19:55 +00:00
B<tabdump> B<-w 'groups==compute'> B<nodelist>
2011-03-30 15:01:42 +00:00
=item *
To display the contents of the nodelist table where the groups attribute is comput% where % is a wildcard and can represent any string and the status attribute is booted :
2011-04-21 18:19:55 +00:00
B<tabdump> B<-w 'groups=~comput%'> B<-w 'status==booted'> B<nodelist>
2011-04-18 16:13:51 +00:00
=item *
2011-04-18 16:22:22 +00:00
To display the records of the auditlog on date 2011-04-18 11:30:00 :
2011-04-18 16:13:51 +00:00
2011-04-21 18:19:55 +00:00
B<tabdump> B<-w 'audittime==2011-04-18 11:30:00'> B<auditlog>
2011-04-18 16:13:51 +00:00
2011-04-21 18:19:55 +00:00
=item *
To display the records of the auditlog starting on 2011-04-18:
tabdump -w 'audittime>2011-04-18 11:30:00' auditlog
2011-03-30 15:01:42 +00:00
=item *
2013-08-01 16:17:05 +00:00
To display the 10 most recent entries in the auditlog:
tabdump -n 10 auditlog
=item *
2008-03-05 16:49:19 +00:00
To see what tables exist in the xCAT database:
2009-05-20 13:31:55 +00:00
B<tabdump>
2008-03-05 16:49:19 +00:00
=item *
2011-04-21 18:19:55 +00:00
To back up all the xCAT database tables, instead of running B<tabdump> multiple times, you can use the B<dumpxCATdb> command as follows:
B<dumpxCATdb -p /tmp/xcatbak >
2008-02-18 15:57:25 +00:00
2011-04-21 18:19:55 +00:00
See the B<dumpxCATdb> man page for details.
2008-02-14 14:25:49 +00:00
2008-03-05 16:49:19 +00:00
=item *
To display a summary description of each table:
2011-04-21 18:19:55 +00:00
B<tabdump> B<-d>
2008-03-05 16:49:19 +00:00
=item *
2008-02-21 21:10:35 +00:00
2008-03-05 16:49:19 +00:00
To display a description of each column in the nodehm table:
2008-02-21 21:10:35 +00:00
2011-04-21 18:19:55 +00:00
B<tabdump> B<-d nodehm>
2008-02-21 21:10:35 +00:00
2008-03-05 16:49:19 +00:00
=back
2008-02-21 21:10:35 +00:00
2008-02-14 14:25:49 +00:00
=head1 FILES
/opt/xcat/sbin/tabdump
2008-03-05 16:49:19 +00:00
=head1 SEE ALSO
2008-02-14 14:25:49 +00:00
2008-08-02 16:18:07 +00:00
L<tabrestore(8)|tabrestore.8>, L<tabedit(8)|tabedit.8>, L<dumpxCATdb(1)|dumpxCATdb.1>