28 $Usage =
"Usage: " . basename($argv[0]) .
" 31 --help help, this message (Note: the user postgres should have write permission on the output file.) 34 $Options = getopt(
"hf:", array(
"help"));
38 foreach($Options as $Option => $OptVal)
43 $SchemaFilePath = $OptVal;
52 echo
"Invalid Option \"$Option\".\n";
58 # dump license_ref table into a temp file 59 if (empty($SchemaFilePath)) $SchemaFilePath =
"licenseref.sql";
60 $dump_command =
"sudo su postgres -c 'pg_dump -f $SchemaFilePath -a -t license_ref --column-inserts fossology'";
61 system($dump_command, $return_var);
63 if(!$return_var) exit (0);