public class Backup
extends org.h2.util.Tool
Constructor and Description |
---|
Backup() |
Modifier and Type | Method and Description |
---|---|
static void |
execute(java.lang.String zipFileName,
java.lang.String directory,
java.lang.String db,
boolean quiet)
Backs up database files.
|
static void |
main(java.lang.String... args)
Options are case sensitive.
|
void |
runTool(java.lang.String... args)
Run the tool with the given output stream and arguments.
|
public static void main(java.lang.String... args) throws java.sql.SQLException
[-help] or [-?] | Print the list of options |
[-file <filename>] | The target file name (default: backup.zip) |
[-dir <dir>] | The source directory (default: .) |
[-db <database>] | Source database; not required if there is only one |
[-quiet] | Do not print progress information |
args
- the command line argumentsjava.sql.SQLException
- on failurepublic void runTool(java.lang.String... args) throws java.sql.SQLException
org.h2.util.Tool
runTool
in class org.h2.util.Tool
args
- the argument listjava.sql.SQLException
- on failurepublic static void execute(java.lang.String zipFileName, java.lang.String directory, java.lang.String db, boolean quiet) throws java.sql.SQLException
zipFileName
- the name of the target backup file (including path)directory
- the source directory namedb
- the source database name (null if there is only one database,
and empty string to backup all files in this directory)quiet
- don't print progress informationjava.sql.SQLException
- on failure