PgIncBackup

From SemanticLab

Jump to: navigation, search

Contents

Introduction

PgIncBackup is a tool software written in Java that can perform incremental backups from PostgreSQL-Databases. It needs background help of the [wiki.postgresql.org/wiki/Londiste_Tutorial/ Londiste daemon], which is part of the Skytools Project. A second tool software (also written in Java) performs the restore process.

Features

  • Londiste daemon writes changes from a main database (provider) to a second database (subscriber)
  • User can start backup at any time via the Java tool
  • Subscriber data is saved to a file and afterwards deleted
  • Restoring DB: Schema + backup files can be used to recreate any previous state
  • Commands are executed from the command shell.


Not Supported Features

  • Graphical user interface


Configuration

Following list shows the command line parameters for the backup program:

  • --host........Host that is running the database
  • --port........Port the database listens on
  • --db..........Name of the database
  • --user .......Username for accessing the database
  • --pw .........Password for the user
  • --path .......Path for saving/reading the backup files

The following shows the command line parameters for the restore program:

  • all the mentioned parameters from above
  • -target.......Integer that describes the desired state to restore


Example

Backup of the subscriber database called 'tsubscriber':

java -jar Backup.jar --host localhost --port 5432 --db tsubscriber --user tommy --pw "" --path "/home/tommy/Desktop/backup/"

Restoring the database called 'trestore':

java -jar DataInsert.jar --host localhost --port 5432 --db trestore --user tommy --pw "" --path "/home/tommy/Desktop/backup/" --target 5

Sources

You can checkout the complete source from subversion:

https://svn.semanticlab.net/svn/oss/thesis/pgIncBackup/complete/Backup
https://svn.semanticlab.net/svn/oss/thesis/pgIncBackup/complete/DataInsert


The executable Version (Jar-File) is available at:

https://svn.semanticlab.net/svn/oss/thesis/pgIncBackup/jar/Backup-Programm
https://svn.semanticlab.net/svn/oss/thesis/pgIncBackup/jar/DataInsert-Programm
Personal tools