diff options
author | intrigeri <intrigeri@boum.org> | 2007-10-12 17:06:09 +0000 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2007-10-12 17:06:09 +0000 |
commit | 579ea902ba24854b3c9acb307cda7e996e8e41a3 (patch) | |
tree | 373ce0a2242050dad65b84950520c6d44a9445fc /handlers/pgsql.helper | |
parent | be75e4e6c536882c14db9a41c61585e7a9c045f6 (diff) | |
download | backupninja-579ea902ba24854b3c9acb307cda7e996e8e41a3.tar.gz backupninja-579ea902ba24854b3c9acb307cda7e996e8e41a3.tar.bz2 |
fixed autotools build, broken since r466, inhandlers/Makefile.am
Diffstat (limited to 'handlers/pgsql.helper')
-rw-r--r-- | handlers/pgsql.helper | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/handlers/pgsql.helper b/handlers/pgsql.helper deleted file mode 100644 index 8024616..0000000 --- a/handlers/pgsql.helper +++ /dev/null @@ -1,107 +0,0 @@ -# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- - -HELPERS="$HELPERS pgsql:postgresql_database_backup" - -do_pgsql_vserver() { - choose_one_vserver "$pgsql_title" - [ $? = 0 ] || return 1 - pgsql_vsname="vsname = $REPLY" -} - -do_pgsql_databases() { - REPLY= - while [ -z "$REPLY" ]; do - formBegin "$pgsql_title: databases" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formItem "Database:" - formDisplay - [ $? = 0 ] || return 1 - pgsql_databases="databases = " - for i in $REPLY; do - [ -n "$i" ] && pgsql_databases="$pgsql_databases $i" - done - done -} - -pgsql_wizard() { - - # constants - pgsql_title="PostgreSQL action wizard" - - # backup the host system or a Vserver? - choose_host_or_one_vserver "$pgsql_title" - [ $? = 0 ] || return 1 - if [ $host_or_vservers == vservers ]; then - do_pgsql_vserver - [ $? = 0 ] || return 1 - fi - - # backupdir - inputBox "$pgsql_title" "Directory where to store the backups:`[ -z \"$pgsql_vsname\" ] || echo \"\n(In respect to chosen vserver's root directory)\"`" "/var/backups/postgres" - [ $? = 1 ] && return - pgsql_backupdir="backupdir = $REPLY" - - # databases - booleanBox "$pgsql_title" "Do you want to backup the whole cluster? If not, you'll be offered to choose the databases to backup." - if [ $? = 0 ]; then - pgsql_databases="databases = all" - else - do_pgsql_databases - [ $? = 0 ] || return 1 - fi - - # compress - booleanBox "$pgsql_title" "Do you want to compress the backups?" - if [ $? = 0 ]; then - pgsql_compress="compress = yes" - else - pgsql_compress="compress = no" - fi - - # write config file - get_next_filename $configdirectory/20.pgsql - cat >> $next_filename <<EOF -### backupninja PostgreSQL config file ### - -# vsname = <vserver> (no default) -# what vserver to operate on, only used if vserver = yes in /etc/backupninja.conf -# if you do not specify a vsname the host will be operated on -# Note: if operating on a vserver, $VROOTDIR will be prepended to backupdir. -EOF - if [ $host_or_vservers == vservers ]; then - echo -e "$pgsql_vsname\n" >> $next_filename - fi - - cat >> $next_filename <<EOF -# backupdir = <dir> (default: /var/backups/postgres) -# where to dump the backups -$pgsql_backupdir - -# databases = < all | db1 db2 db3 > (default = all) -# which databases to backup. should either be the word 'all' or a -# space separated list of database names. -# Note: when using 'all', pg_dumpall is used instead of pg_dump, which means -# that cluster-wide data (such as users and groups) are saved. -$pgsql_databases - -# compress = < yes | no > (default = yes) -# if yes, compress the pg_dump/pg_dumpall output. -$pgsql_compress - -### You can also set the following variables in backupninja.conf: -# PGSQLDUMP: pg_dump path (default: /usr/bin/pg_dump) -# PGSQLDUMPALL: pg_dumpall path (default: /usr/bin/pg_dumpall) -# PGSQLUSER: user running PostgreSQL (default: postgres) - -EOF - chmod 600 $next_filename - -} |