xcat-core/xCAT-client/pods/man8/tabrestore.8.pod
2010-02-08 01:14:31 +00:00

75 lines
1.3 KiB
Plaintext

=head1 NAME
B<tabrestore> - replaces the contents of an xCAT database table with the contents in a csv file.
=head1 SYNOPSIS
B<tabrestore> I<table.csv>
B<tabrestore> [I<-?> | I<-h> | I<--help>]
=head1 DESCRIPTION
The tabrestore command reads the contents of the specified file and puts its data
in the corresponding table in the xCAT database. Any existing rows in that table
are replaced. The file must be in csv format. It could be created by tabdump.
Only one table can be specified.
This command can be used to copy the example table entries in /opt/xcat/share/xcat/templates/e1350
into the xCAT database.
=head1 OPTIONS
=over 10
=item B<-?|-h|--help>
Display usage message.
=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 put rows into the mp table:
B< tabrestore> I<mp.csv>
The file mp.csv could contain something like:
#node,mpa,id,comments,disable
"blade","|\D+(\d+)|amm(($1-1)/14+1)|","|\D+(\d+)|(($1-1)%14+1)|",,
=item *
To restore database tables that we dumped with dumpxCATdb:
restorexCATdb -p <restore directory:
=back
=head1 FILES
/opt/xcat/sbin/tabrestore
=head1 SEE ALSO
L<tabdump(8)|tabdump.8>, L<tabedit(8)|tabedit.8>, L<dumpxCATdb(1)|dumpxCATdb.1>