| java.lang.Object org.continuent.sequoia.controller.backup.backupers.AbstractBackuper org.continuent.sequoia.controller.backup.backupers.AbstractPostgreSQLBackuper org.continuent.sequoia.controller.backup.backupers.PostgreSQLSplitPlainTextBackuper
PostgreSQLSplitPlainTextBackuper | public class PostgreSQLSplitPlainTextBackuper extends AbstractPostgreSQLBackuper (Code) | | This class defines a Backuper for PostgreSQL databases. This backuper makes
dumps in a plain-text format.
This class backups PostgreSQL database usig pg_dump. backup command from
console executes the pg_dump with split, and example pg_dump dbName -h
127.0.0.1 -p 5432 -U postgres | split -a 4 -b 10m - /tmp/dumpFile which does
spliting ONE single dump file to splitted files. Size of the splitted files
are determined by virtual xml file in options for Backuper, and example
default size is 1000m Restore command
restores the DB from splitted files, and example cat /tmp/dumpFile* | psql
dbName -h 127.0.0.1 -p 5432 -U postgres restore checks the existing of dump
file for first suffix dumpFileaaaa (suffix is set to 4) Contributer also
added two methods and one varibale to AbstractPostgreSQLBackuper class
protected String[] makeSplitCommand(String command, PostgreSQLUrlInfo info,
String options, String login) protected String[]
makeSplitCommandWithAuthentication(String command, PostgreSQLUrlInfo info,
String options, String login, String password, boolean isPsql) static
protected String SPLIT_SIZE = "1000m"; Contributor for this class: Gurkan
Ozfidan
Supported URLs are:
- jdbc:postgresql://host:port/dbname?param1=foo,param2=bar
- jdbc:postgresql://host/dbname?param1=foo,param2=bar
- jdbc:postgresql:dbname?param1=foo,param2=bar
author: Emmanuel Cecchet author: Dylan Hansen author: Mathieu Peltier author: Olivier Fambon version: 1.0 |
Method Summary | |
public Date | backup(DatabaseBackend backend, String login, String password, String dumpName, String path, ArrayList tables) | public void | deleteDump(String path, String dumpName) | public void | fetchDump(DumpTransferInfo dumpTransferInfo, String path, String dumpName) | public String | getDumpFormat() | public void | restore(DatabaseBackend backend, String login, String password, String dumpName, String path, ArrayList tables) Restores the DB using cat/psql commands; It restores the DB using splitted
dump files. |
DUMP_FORMAT | final public static String DUMP_FORMAT(Code) | | The dump format for this (family of) backuper.
|
Methods inherited from org.continuent.sequoia.controller.backup.backupers.AbstractPostgreSQLBackuper | public void deleteDump(String path, String dumpName) throws BackupException(Code)(Java Doc) protected int executeNativeCommand(String[] stdinFeed, String[] commands) throws IOException, InterruptedException(Code)(Java Doc) protected int executeNativeCommand(String command) throws IOException, InterruptedException(Code)(Java Doc) protected int executeNativeCommand(String[] commands) throws IOException, InterruptedException(Code)(Java Doc) protected int getDefaultPort()(Code)(Java Doc) protected String getDumpPhysicalPath(String path, String dumpName)(Code)(Java Doc) protected String getJdbcUrlPrefix()(Code)(Java Doc) public String getOptions()(Code)(Java Doc) protected String getPsqlCommand()(Code)(Java Doc) protected String makeCommand(String command, PostgreSQLUrlInfo info, String options, String login)(Code)(Java Doc) protected String[] makeCommandWithAuthentication(String command, PostgreSQLUrlInfo info, String options, String login, String password, boolean isPsql)(Code)(Java Doc) protected String[] makeExpectCommandReadingStdin()(Code)(Java Doc) protected String[] makeExpectDialogueWithAuthentication(String command, PostgreSQLUrlInfo info, String options, String login, String password, int timeout)(Code)(Java Doc) protected String[] makeSplitCommand(String command, PostgreSQLUrlInfo info, String options, String login)(Code)(Java Doc) protected String[] makeSplitCommandWithAuthentication(String command, PostgreSQLUrlInfo info, String options, String login, String password, boolean isPsql)(Code)(Java Doc) protected void printErrors()(Code)(Java Doc) protected void printOutput()(Code)(Java Doc) protected boolean safelyExecNativeCommand(String cmd, String[] inputArray, int timeout)(Code)(Java Doc) protected boolean safelyExecNativeCommand(String[] cmds, String[] inputArray, int timeout)(Code)(Java Doc) public void setOptions(String options)(Code)(Java Doc)
|
|
|