org.h2.tools
Class Backup
java.lang.Object
org.h2.util.Tool
org.h2.tools.Backup
public class Backup
- extends Tool
Creates a backup of a database.
Fields inherited from class org.h2.util.Tool |
out |
Method Summary |
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 |
run(java.lang.String... args)
Run the tool with the given output stream and arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Backup
public Backup()
main
public static void main(java.lang.String... args)
throws java.sql.SQLException
- Options are case sensitive. Supported options are:
[-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 |
- Parameters:
args
- the command line arguments
- Throws:
java.sql.SQLException
run
public void run(java.lang.String... args)
throws java.sql.SQLException
- Description copied from class:
Tool
- Run the tool with the given output stream and arguments.
- Specified by:
run
in class Tool
- Parameters:
args
- the argument list
- Throws:
java.sql.SQLException
execute
public static void execute(java.lang.String zipFileName,
java.lang.String directory,
java.lang.String db,
boolean quiet)
throws java.sql.SQLException
- Backs up database files.
- Parameters:
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)quiet
- don't print progress information
- Throws:
java.sql.SQLException