xcat-core/xCAT-client/pods/man8/tabdump.8.pod
nott 17642ec34e add another example
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9367 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-04-21 18:19:55 +00:00

138 lines
3.3 KiB
Plaintext

=head1 NAME
B<tabdump> - display an xCAT database table in CSV format.
=head1 SYNOPSIS
B<tabdump> [I<-d>] [I<table>]
B<tabdump> [I<table>]
B<tabdump> [I<-w> I<attr>==I<val>] [B<-w> I<attr>=~I<val>] ...] [I<table>]
B<tabdump> [I<-v> | I<--version>]
B<tabdump> [I<-?> | I<-h> | I<--help>]
B<tabdump>
=head1 DESCRIPTION
The tabdump command displays the header and all the rows of the specified table in CSV (comma separated values) format.
Only one table can be specified. If no table is specified, the list of existing
tables will be displayed.
=head1 OPTIONS
=over 10
=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.
=item B<-w> I<'attr==val'> B<-w> I<'attr=~val'> ...
Use one or multiple -w flags to specify the selection string that can be used to select particular rows of the table. See examples.
Operator descriptions:
== 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.
=back
=head1 RETURN VALUE
=over 3
=item 0
The command completed successfully.
=item 1
An error has occurred.
=back
=head1 EXAMPLES
=over 2
=item *
To display the contents of the site table:
B<tabdump> B<site>
=item *
To display the contents of the nodelist table where the groups attribute is compute :
B<tabdump> B<-w 'groups==compute'> B<nodelist>
=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 :
B<tabdump> B<-w 'groups=~comput%'> B<-w 'status==booted'> B<nodelist>
=item *
To display the records of the auditlog on date 2011-04-18 11:30:00 :
B<tabdump> B<-w 'audittime==2011-04-18 11:30:00'> B<auditlog>
=item *
To display the records of the auditlog starting on 2011-04-18:
tabdump -w 'audittime>2011-04-18 11:30:00' auditlog
=item *
To see what tables exist in the xCAT database:
B<tabdump>
=item *
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 >
See the B<dumpxCATdb> man page for details.
=item *
To display a summary description of each table:
B<tabdump> B<-d>
=item *
To display a description of each column in the nodehm table:
B<tabdump> B<-d nodehm>
=back
=head1 FILES
/opt/xcat/sbin/tabdump
=head1 SEE ALSO
L<tabrestore(8)|tabrestore.8>, L<tabedit(8)|tabedit.8>, L<dumpxCATdb(1)|dumpxCATdb.1>