aceb17bc7f
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@505 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
=head1 NAME
|
|
|
|
B<tabrestore> - replaces the contents of an xCAT database table with the contents in a csv file.
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
I<tabrestore table.csv>
|
|
|
|
I<tabrestore [? | -h | --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
|
|
|
|
B<-?|-h|--help> Display usage message.
|
|
|
|
=head1 RETURN VALUE
|
|
|
|
0 The command completed successfully.
|
|
|
|
1 An error has occurred.
|
|
|
|
=head1 EXAMPLES
|
|
|
|
1. To put rows into the mp table:
|
|
|
|
tabrestore 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)|",,
|
|
|
|
2. To restore database tables that were dumped with tabdump:
|
|
|
|
cd /tmp/xcatdb.backup
|
|
for i in *.csv;do echo "Restoring $i..."; tabrestore $i; done
|
|
|
|
=head1 FILES
|
|
|
|
/opt/xcat/sbin/tabrestore
|
|
|
|
=head1 NOTES
|
|
|
|
This command is part of the xCAT software product. |