bart installation and upgrade guide€¦ · bart installation and upgrade guide, release 2.5.4...

35
BART Installation and Upgrade Guide Release 2.5.4 BART Installation and Upgrade Guide Jun 15, 2020

Upload: others

Post on 21-Sep-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

  • BART Installation and Upgrade GuideRelease 2.5.4

    BART Installation and Upgrade Guide

    Jun 15, 2020

  • Contents

    1 Requirements Overview 11.1 Supported Platforms and Database Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    2 Installing BART 22.1 Installing BART on a CentOS/RHEL Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 Installing BART on a Debian or Ubuntu Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Installing BART on an SLES 12 Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    3 Configuring BART 73.1 Establishing the BART User Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Configuring the BART Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    3.2.1 Configuration Parameter Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 Configuring the Database Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    3.3.1 Authorizing SSH/SCP Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3.2 Setting up a Replication Database User . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.3.3 Adding a Database Server to the BART Configuration File . . . . . . . . . . . . . . . . . . 17

    3.3.3.1 Database Server Parameter Reference . . . . . . . . . . . . . . . . . . . . . . . . . 173.3.4 Enabling WAL Archiving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.3.5 Verifying Configuration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    4 Troubleshooting 26

    5 Upgrading BART 275.1 Upgrading from Older Versions of BART (except 2.0) . . . . . . . . . . . . . . . . . . . . . . . . . 285.2 Upgrading from BART 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    6 Uninstalling BART 306.1 Uninstalling BART on a RHEL/CentOS Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.2 Uninstalling BART on an SLES 12 Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.3 Uninstalling BART on a Debian/Ubuntu Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    7 Conclusion 32

    Index 33

    i

  • CHAPTER 1

    Requirements Overview

    1.1 Supported Platforms and Database Versions

    • To view a complete list of platforms supported by BART, visit the EnterpriseDB website.

    • BART supports the following database versions:

    – Advanced Server versions 9.5, 9.6, 10, 11, 12

    – PostgreSQL versions 9.5, 9.6, 10, 11, 12

    1.2 Software Requirements

    The following components are required for BART installation.

    • BART Host Components - Use EnterpriseDB packages to add BART host components; see Installing BARTusing an RPM Package for installation instructions.

    • Additional Components - In addition to the BART host components, the following components are required:

    – The Secure Shell (SSH) server daemon and Secure Copy (SCP) client programs must be enabled and acti-vated on the BART host as well as on the remote database server hosts on which BART will be managingbackup and recovery.

    – BART uses the pg_basebackup utility program when taking full backups.

    1.3 Limitation

    BART supports taking only a full backup of standby servers; it does not support taking incremental or parallel backupsof standby servers.

    1

    https://www.enterprisedb.com/services-support/edb-supported-products-and-platforms

  • CHAPTER 2

    Installing BART

    This section will walk you through performing a fresh installation of BART on a host. Installation instructions areorganized into the following platform/installer specific sections:

    • Installing Install BART on a CentOS or RHEL Host

    • Installing BART on a Debian or Ubuntu Host

    • Installing BART on an SLES 12 Host

    2.1 Installing BART on a CentOS/RHEL Host

    The following section demonstrates installing BART 2.5.4 on a RHEL/CentOS host. This section assumes that theuser has some knowledge of installation and system administration procedures, and has administrative privileges onthe host.

    1. On a CentOS/RHEL 6 OS host, you need to install the Extra Packages for Enterprise Linux (EPEL) package byassuming the superuser privileges and invoking the following command:

    yum install epel-release

    If you encounter any error while installing epel, see Troubleshooting for a workaround.

    On a RHEL/CentOS 7 and 8 host, the EPEL package, which contains supporting boost libraries required by BART isinstalled by default.

    2. Use either yum, dnf, or rpm to create the repository configuration file:

    rpm -Uvh https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    On RHEL/CentOs 6 and 7:

    yum install -y https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    On RHEL/CentOs 8:

    2

  • BART Installation and Upgrade Guide, Release 2.5.4

    dnf install -y https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    3. Visit this page at the EnterpriseDB website to request credentials to the EDB Yum Repository.

    4. Use your choice of editor to open and modify the repository configuration file. The repository configuration fileis named edb.repo and is located in the /etc/yum.repos.d directory.

    5. After creating the edb.repo file,

    • ensure the value of the enabled parameter is 1.

    • replace the username and password placeholders in the baseurl specification with the name andpassword of a registered EnterpriseDB user.

    • save the configuration file and exit the editor.

    [edb]name=EnterpriseDB RPMs $releasever - $basearchbaseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearchenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY

    6. Optionally, install the pg_basebackup utility program using the server client package. If you do not alreadyhave the pg_basebackup program installed on the BART host, you can install a limited number of files thatinclude the pg_basebackup program by invoking the following command:

    On RHEL/CentOS 6 and 7:

    yum install edb-asxx-server-client

    On RHEL/CentOS 8:

    dnf install edb-asxx-server-client

    In the above command, replace xx with the required Advanced Server version. The pg_basebackupversion must be the same or more recent than the database server to be backed up. For example,pg_basebackup version 10 can be used to back up database server version 10, but cannot be usedto back up database server version 11.

    7. Use the following command to install the BART RPM package:

    On RHEL/CentOS 6 and 7:

    yum install edb-bart

    On RHEL/CentOS 8:

    dnf install edb-bart

    1. Repeat the installation process described in this section to install BART on each remote host on which anincremental backup is to be restored.

    2. To verify the BART installation, navigate to the /usr/bart/bin directory and execute the following com-mand:

    bart --version

    2.1. Installing BART on a CentOS/RHEL Host 3

    https://www.enterprisedb.com/repository-access-request/

  • BART Installation and Upgrade Guide, Release 2.5.4

    The bart --version command should return the current BART version. If the bart --version com-mand returns an error stating the PATH is not available after switching from the root user to another BART useraccount, adjust the setting of the PATH environment variable to include the directory location of the BART binsubdirectory in the ~/.bashrc or ~/.bash_profile files of the following user accounts:

    • The BART user account on the BART host. See Configuring BART for details.

    • The remote user account on the remote host to which incremental backups are to be restored. For details,see the EDB Postgres Backup and Recovery User Guide available at the EDB website.

    Upon successful installation, BART is installed in the BART_HOME directory:

    /usr/edb/bart

    The installation includes the following files:

    File Name Location Descriptionbart /bin BART command line, executable programbart-scanner /bin BART WAL scanner programbart.cfg.sample /etc Sample BART configuration filexlogreader_ident.so /lib Libraries supporting WAL versionsbart_license.txt License agreement

    After BART is installed successfully, you need to configure the installation.

    2.1. Installing BART on a CentOS/RHEL Host 4

    https://www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    2.2 Installing BART on a Debian or Ubuntu Host

    To install BART on a Debian or Ubuntu host, you must have credentials that allow access to the EnterpriseDB reposi-tory. To request credentials for the repository, visit the EnterpriseDB website.

    Perform the following steps to install a Debian package using the EnterpriseDB apt repository.

    1. Assume the superuser privileges.

    sudo su -

    2. Configure the EnterpriseDB repository; substitute your EnterpriseDB credentials for the username andpassword placeholders in the following command:

    sh -c 'echo "deb https://username:[email protected]/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

    3. Add support to your system for secure APT repositories.

    apt-get install apt-transport-https

    4. Add the EDB signing key; When invoking the command, replace the username and password with thecredentials provided by EnterpriseDB.

    wget -q -O - https://username:[email protected]/edb-deb.gpg.key | apt-key add -

    5. Update the repository metadata.

    apt-get update

    6. Install the Debian package.

    apt-get install edb-bart

    2.2. Installing BART on a Debian or Ubuntu Host 5

    https://www.enterprisedb.com/repository-access-request

  • BART Installation and Upgrade Guide, Release 2.5.4

    2.3 Installing BART on an SLES 12 Host

    This section provides instructions for installing BART on an SLES 12 SP4 host using the zypper package manager.

    Note: BART is supported on SLES SP4 and SP5 versions.

    1. Assume superuser privileges and use the following command to add the EnterpriseDB repository configurationfile to your SLES host:

    zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

    This command creates a repository configuration file named edb.repo in the /etc/zypp/repos.d directory.

    2. Use the zypper utility to install BART.

    zypper install edb-bart

    2.3. Installing BART on an SLES 12 Host 6

  • CHAPTER 3

    Configuring BART

    To configure BART, you must identify the BART user account, configure the BART host, and configure the databaseserver that will be backed up.

    3.1 Establishing the BART User Account

    The BART user account is an operating system user that will run the BART command line program. The BART useraccount must:

    • own the BART backup catalog.

    • be able to run the bart program and the bart-scanner program.

    • be able to establish a SSH/SCP connection to and from each database server managed by BART.

    You can optionally use the enterprisedb database user as the BART user account for an Advanced Server databaseand use the postgres database user as the BART user account for a PostgreSQL server. If you do not wish to usean existing database user as the BART user account, you must create an operating system user to assume the role.

    7

  • BART Installation and Upgrade Guide, Release 2.5.4

    3.2 Configuring the BART Host

    This section describes the configuration steps that must be performed on the BART host; these steps must be performedas a root user.

    Step 1. Navigate to the usr/edb/bart/etc directory and make a copy of the bart.cfg.sample file to createthe bart.cfg file that will contain the parameter settings.

    Step 2. Confirm that the Postgres pg_basebackup utility program is installed on the BART host. Thepg_basebackup utility resides in the bin directory under your Postgres installation.

    Step 3. Ensure the LD_LIBRARY_PATH environment variable includes the location of the libpq library. If yourlibpq library does not reside in the default location (POSTGRES_INSTALL_HOME/lib), you must add the librarypath to the LD_LIBRARY_PATH environment variable in the BART user account’s profile (bash_profile) locatedin /home/:

    # .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsexport LD_LIBRARY_PATH=/usr/edb/as11/lib:$LD_LIBRARY_PATH

    Step 4. Create the BART backup catalog and ensure the BART user account holds privileges on the BART backupcatalog. In the following example, the BART configuration file specifies /opt/backup as the parent directory forthe BART backup catalog in the parameter:

    [BART]

    bart_host = [email protected]_path = /opt/backuppg_basebackup_path = /usr/edb/as11/bin/pg_basebackuplogfile = /tmp/bart.logscanner_logfile = /tmp/bart_scanner.log

    In the following example, bartuser is the BART user account. The example creates and sets the ownership andpermissions on the BART backup catalog:

    su rootmkdir /opt/backupchown bartuser /opt/backupchgrp bartuser /opt/backupchmod 700 /opt/backup

    If the subdirectory does not exist, BART creates a subdirectory for each database server listed in the configuration filewhen you invoke the bart command line program.

    Step 5. Use your choice of editor to open the BART configuration file (located in the usr/edb/bart/etc direc-tory) and edit the configuration as required. You must add the mandatory parameters to the [BART] and [ServerName]sections (for example, [EPAS11]). Default values may be used for optional parameters.

    Step 6 Invoke the CHECK-CONFIG subcommand, omitting the -s option to check the parameter settings in the BARTconfiguration file. The CHECK-CONFIG subcommand displays an error message if the required configuration is notproperly set.

    For information about server section parameters, see the Database Server Parameter Reference.

    3.2. Configuring the BART Host 8

  • BART Installation and Upgrade Guide, Release 2.5.4

    3.2.1 Configuration Parameter Reference

    In the table that follows:

    • Parameters set in the [BART] section are applicable to all BART managed database servers.

    • Parameters set in the Server section are applicable only to the specific server; the Server parameter settingoverrides the [BART] section setting.

    Parameter Type Default Server [BART][BART] Mandatory N/A N/A yes Mandatory N/A N/A Yes Mandatory N/A N/A Yes Mandatory N/A N/A Yesretention_policy Optional BACKUPS Yes Yeswal_compression Optional Disabled Yes Yescopy_wals_during_restore Optional Disabled Yes Yesxlog_method Optional fetch Yes Yeslogfile Optional /tmp/bart.log N/A Yesscanner_logfile Optional /tmp/bart_scanner.log N/A Yes Optional /tmp N/A Yes Optional 1 Yes Yes Optional 49152 Yes Yes Optional 0 Yes Yes Optional 20 seconds Yes Yes Optional 1 Yes Yes[Server Name] Mandatory N/A Yes N/A Optional N/A Yes N/Ahost Mandatory N/A Yes N/Aport Mandatory 5444 for EPAS; 5432 for Post-

    gresYes N/A

    user Mandatory N/A Yes N/A Optional BART backup catalog Yes N/A Optional N/A Yes N/A Mandatory enterprisedb for EPAS

    postgres for PostgreSQLYes N/A

    Optional N/A Yes N/A Optional N/A Yes N/Aallow_incremental_backup Optional Disabled Yes N/Adescription Optional N/A Yes N/A

    The following table describes the [BART] host parameters.

    Parameters/Placeholder Description[BART} (mandatory) Identifies the global section of the configuration file (it must be

    named BART).bart_host (mandatory) Specify the bart user name and the IP address of the bart

    host on which the BART utility resides, in the form of@.

    backup_path (mandatory) Specify the path to the file system parent directory where all BARTbackups are stored.

    Continued on next page

    3.2. Configuring the BART Host 9

  • BART Installation and Upgrade Guide, Release 2.5.4

    Table 3.1 – continued from previous pageParameters/Placeholder Descriptionpg_basebackup_path(mandatory)

    Specify the path to the pg_basebackup program thatyou installed on the BART host. For information aboutpg_basebackup version-specific restrictions, see the EDB Post-gres Backup and Recovery User Guide.

    wal_compression (optional)Set this parameter to enabled to compress the archived WALfiles in gzip format in the BART backup catalog when the MANAGEsubcommand is invoked. By default it is set to disabled.The gzip compression program must be in the BART useraccount’s PATH and the WAL compression setting must not beenabled for those database servers where you need to takeincremental backups.

    copy_wals_during_restore (op-tional) Set this parameter to enabled to copy the archived WAL files

    from the BART backup catalog to therestore_path/archived_wals directory prior to thedatabase server archive recovery. Enabling this option helps yousave time during the restore operation.Set this parameter to disabled (default) to retrieve thearchived WAL files directly from the BART backup catalog duringthe database server archive recovery.During the restore operation, recovery settings will be saved in thepostgresql.auto.conf file. The restore_command inthe postgresql.auto.conf file will be determined by thevalue specified in the copy_wals_during_restoreparameter.If the RESTORE subcommand is invoked with the -c option, thearchived WAL files are copied from the BART backup catalog tothe restore_path/archived_wals directory, thusoverriding any setting of the copy_wals_during_restoreparameter. If the RESTORE subcommand is invoked without the-c option, the value specified by thecopy_wals_during_restore parameter is used.

    xlog_method (optional)Specify how the transaction log is collected during the execution ofpg_basebackup through the BACKUP subcommand.Set xlog_method to fetch (default) to collect the transactionlog files after the backup is completed.Set to stream to stream the transaction log in parallel with thefull backup creation.

    Continued on next page

    3.2. Configuring the BART Host 10

    https://www.enterprisedb.com/edb-docs/https://www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    Table 3.1 – continued from previous pageParameters/Placeholder Descriptionretention_policy (optional)

    Set this parameter to determine when an active backup should bemarked as obsolete when the MANAGE subcommand is used.You can specify the retention policy either in terms of number ofbackups or duration (days, weeks, or months). BACKUPS (default), DAYS, WEEKS, or MONTHS where is a positive integer.For information about managing backups using a retention policy,see the EDB Postgres Backup and Recovery User Guide.

    logfile (optional)Use this parameter to specify the path to the BART log file. Thedefault log file location is /tmp/bart.log.The log file will be created the first time you invoke the bartcommand line program using the sample configuration file value.To change the default setting, you must delete the bart.log filefrom the /tmp directory and create a new log file in anotherdirectory so that a new log file will be created and owned by thenew BART user account.If no path to a log file is specified, BART does not create a log file.

    scanner_logfile (optional)Use this parameter to specify the path to the XLOG/WAL scannerlog file. The default location is /tmp/bart_scanner.log.The scanner log file will be created the first time you invoke thebart_scanner program using the sample configuration filevalue. To change the default setting, you must delete thebart_scanner.log file from the /tmp directory and create anew log file in another directory so that a new log file will becreated and owned by the new BART user account.If no path to a log file is specified, BART does not create a WALscanner log file.

    (optional)

    Specify the socket directory path where all BART sockets willbe stored. The default directory is /tmp. While specifying thebart_socket_directory path, you must ensure that the di-rectory exists and the BART user has the required access permis-sions to the directory.

    Continued on next page

    3.2. Configuring the BART Host 11

    https:www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    Table 3.1 – continued from previous pageParameters/Placeholder Description (optional)

    Specify the number of worker threads for copying blocks (forincremental backups) or data files (for full backup) from thedatabase server to the archive_path when the BACKUPsubcommand is invoked. The default value is 1.The same set of worker threads are used for the compressionoperation when taking full backups in order to provide parallel,compressed backups when the BACKUP subcommand is specifiedwith the -z or -c options. The compression operation does notapply to incremental backups. See thread count for moreinformation.

    (optional)Specify the number of blocks of memory used for copyingmodified blocks from the database server to the archive_pathwhen the BACKUP subcommand is invoked for incrementalbackups.The default value is 49152 blocks; each block is 8192 bytes. Themaximum permitted value is 131072 blocks and the minimumpermitted value is 1 block. Reduce the setting ifthe server runs out of memory while executing thepg_read_binary_file().

    (optional) Specify the number of seconds after which the WAL scanner shouldscan the new WAL files. The default value is 0, which means nobrute-force scanning will be started.

    (optional)Specify the number of seconds to wait for MBM files before timingout; This parameter is applicable only for incremental backup.The default value is 20 seconds. The mbm_scan_timeoutparameter value must be greater than 0. If the value is 0 ornegative, then an error will be displayed during an incrementalbackup.

    (optional) Specify the number of parallel worker processes required to streamthe modified blocks of an incremental backup to the restore host.The default value is 1.

    3.2. Configuring the BART Host 12

  • BART Installation and Upgrade Guide, Release 2.5.4

    Thread Count

    If the BACKUP subcommand is invoked with the --thread-count option, then the number of worker threadsspecified by this option overrides any setting of the thread_count parameter in the BART configuration file. If theBACKUP subcommand is invoked without the --thread-count option, then the following determines the numberof worker threads used:

    • The setting of the thread_count parameter in the server section of the BART configuration file overrides thesetting of thread_count in the global section for that particular database server.

    • If omitted in the server section, the setting of thread_count in the global section is used.

    • If the thread_count parameter is not specified in either section, the default is 1.

    • When taking a full backup, if the thread count in effect is only 1, then the pg_basebackup utility is usedto take the full backup unless the --no-pg_basebackup option is specified with the BACKUP subcommand.

    will not be effective if the backup is taken on a standby server.

    If parallel backup is run with N number of worker threads, then it will initiate N + 1 concurrent connections with theserver.

    3.2. Configuring the BART Host 13

  • BART Installation and Upgrade Guide, Release 2.5.4

    3.3 Configuring the Database Server

    This section describes the procedure for enabling BART backup and recovery management for a database server. Toconfigure the database server, you need to:

    • Authorize SSH/SCP access without a password prompt.

    • Create and configure a replication database user.

    • Update the BART configuration file (server section).

    • Enable WAL archiving of the server.

    • Verify the server configuration settings.

    Note: You must authorize SSH/SCP access and set up a replication database user before restarting the database serverwith WAL archiving enabled.

    3.3.1 Authorizing SSH/SCP Access

    BART uses the Secure Shell (ssh) and Secure Copy (scp) Linux utility programs to copy the backup and WAL filesfrom the BART managed database servers to the BART host as well as to restore backups.

    • The client/server ssh and scp commands must not prompt for a password when establishing a connection withthe target server (the server to which a passwordless connection is being made).

    • A passwordless connection uses authorized public keys (public key of a client user account) to authenticate withthe target server.

    • You must add the public key of each client user account to the target user account’s authorized public keys liston the target server.

    BART Connections that Require Authentication without a Password

    For BART usage, there are two scenarios that require a passwordless SSH/SCP connection:

    • When connecting from each BART managed database server (SSH/SCP client) to the BART host (targetSSH/SCP server) to support WAL archiving as implemented by the archive_command parameter.

    – In this case, the database server user account should generate the public key file (id_rsa.pub) with thessh-keygen -t rsa command on the database server host.

    – The public key file name should be appended to the ~/.ssh/authorized_keys file on the BARThost. The authorized_keys file is in the BART user account’s home directory.

    • When connecting from the BART host (SSH/SCP client) to each BART managed database server (targetSSH/SCP server) for taking incremental backups and for supporting restoration of the full backup, the archivedWAL files, and the modified blocks, which occurs when the BART RESTORE subcommand is given.

    – In this case, the BART user account should generate the public key file (id_rsa.pub) with thessh-keygen -t rsa command on the BART host.

    – The public key file name should be appended to the ~/.ssh/authorized_keys file on the databaseserver host. The authorized_keys file is in the home directory of the user account that owns thedirectory where the database backup is to be restored.

    • If backups are to be taken from a given database server host, but restored to a different database server host, thepasswordless SSH/SCP connections must be configured from the BART host to the database server host from

    3.3. Configuring the Database Server 14

  • BART Installation and Upgrade Guide, Release 2.5.4

    which the backup is to be taken as well as from the BART host to the database server host to which the backupis to be restored.

    See the EDB Postgres Backup and Recovery Reference Guide to view examples of creating a passwordless connection.

    Enabling Public Key Authentication

    The following example enables SSH/SCP access on a CentOS 6.x host; similar (platform-specific) steps will apply toother platforms/versions.

    1. In the SSH server daemon configuration file (sshd_config) located in the /etc/ssh, set thePubkeyAuthentication parameter to yes.

    2. Reload the configuration file:

    service sshd reload

    If you get any SSH or SCP errors, examine the /var/log/secure log file.

    Creating a Passwordless Connection

    The following general instructions will walk you through generating a client’s public key file, creating the targetserver’s authorized public keys file, and creating a passwordless connection.

    Step 1. On the client system, log in as the user account that will be initiating the SSH or SCP connection.

    Step 2. Navigate to the user account’s home directory and check for an existing .ssh subdirectory. If the .sshdirectory does not exist, create one and assign the required privileges to the user.

    Step 3. Generate the public key file with the following command. Accept all prompted defaults and do not specify apassphrase when prompted for one.

    ssh-keygen -t rsa

    The public key file named id_rsa.pub is created in the .ssh subdirectory.

    Step 4. While logged into the client where you just generated the public key file, use SCP to make a temporary copyof it on the target server:

    scp ~/.ssh/id_rsa.pub @:tmp.pub

    Step 5. Navigate into the target user account’s home directory and check for an existing .ssh subdirectory. If it doesnot exist, create one and assign the required privileges to the user.

    Step 6. Append the temporary, client’s public key file, tmp.pub, to the authorized_keys file. If anauthorized keys file does not exist, create a new file, but do not completely replace any existing authorizedkeys file.

    cat tmp.pub >> ~/.ssh/authorized_keys

    Make sure the authorized_keys file is only accessible by the file owner and not by groups or other users. Ifthe authorized_keys file does not have the required permission setting or it was newly created, change the filepermissions as follows:

    chmod 600 ~/.ssh/authorized_keys

    Step 7. Delete the temporary public key file:

    rm tmp.pub

    Now, when logged into the client system as user there should be no prompt for a password when commands such asthe following is given:

    3.3. Configuring the Database Server 15

    https://www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    ssh target_user@host_address

    3.3.2 Setting up a Replication Database User

    For each database server that is to be managed by BART, a database user must be chosen to serve as the replicationdatabase user. The replication database user sets the Postgres archive_command configuration parameter whenthe INIT subcommand in invoked and creates backups when the BACKUP subcommand is invoked. The replicationdatabase user must be a superuser.

    When executed with the PSQL client, the following PostgreSQL command creates a superuser to be the replicationdatabase user:

    CREATE ROLE repuser WITH LOGIN SUPERUSER PASSWORD 'password';

    The pg_hba.conf file must minimally permit the replication database user to have access to the database.

    In the following example, the pg_hba.conf file permits the repuser (replication database user) to have access tothe template1 database. The IP address from which repuser has access to template1 database is the locationof the BART host:

    For pg_basebackup only: If pg_basebackup is to be used for taking any backups (such as for standby servers), thereplication database user must also be included in the pg_hba.conf file as a replication database connectionas shown by the last entry in the following example.

    # TYPE DATABASE USER ADDRESS METHOD# "local" is for Unix domain socket connections onlylocal all all md5# IPv4 local connections:host template1 repuser 192.168.2.22/32 md5host all enterprisedb 127.0.0.1/32 md5# IPv6 local connections:host all all ::1/128 md5# Allow replication connections from localhost, by a user with the# replication privilege.host replication repuser 192.168.2.22/32 md5

    The replication database user must be specified for the user parameter in the BART configuration file for the databaseserver as shown in the following example:

    [ACCTG]host = 192.168.2.24port = 5444user = repusercluster_owner = enterprisedbremote_host = [email protected] = "Accounting"

    There must be no password prompt when connecting to the database server with the replication database user. Thereare several ways to permit this; one recommended method is to use a .pgpass file located in the BART user account’shome directory.

    For example, if bartuser is the BART user account, then the .pgpass file located in the /home/bartuserdirectory must contain the following entry:

    192.168.2.24:5444::repuser:password

    When bartuser invokes a BART backup, the password for the replication database user, repuser, is obtained fromthe .pgpass file of bartuser to connect to the database server running at 192.168.2.24 on port 5444.

    3.3. Configuring the Database Server 16

  • BART Installation and Upgrade Guide, Release 2.5.4

    The .pgpass file must contain an entry for each BART managed database server and its corresponding replicationdatabase user and password.

    3.3.3 Adding a Database Server to the BART Configuration File

    To manage the backup and recovery of a database server, you must add entries to the server section of the BARTconfiguration file (located in /etc/bart.cfg). Settings in the server section will override thesettings in the [BART] section for that particular database server. If omitted, default values will be used.

    For each cluster serviced by BART, the following parameters are required:

    [HR]

    host = 192.168.2.24port = 5432user = postgrescluster_owner = postgres

    Note: The port parameter setting is required only if the database server listens on a port other than the default (forexample if Postgres listens on a port other than 5432).

    3.3.3.1 Database Server Parameter Reference

    Set the following parameters in the server section of the BART configuration file. The parameter setting in the serversection overrides the setting in the global [BART] section for that particular database server. If omitted, the defaultvalue will be used.

    The following table describes the database server parameters.

    Parameters/Placeholder Description[ServerName] (mandatory)

    Specify the server name that you want to backup using BART. It isnot case-sensitive when referenced with BART subcommandoptions.A lowercase conversion of this name is used to create asubdirectory in the BART backup catalog for storing the backupsand WAL files for this database server (for eg., epas12).

    (optional)Specify a template for user-defined, friendly names that will beassigned to the backups of the database server. The maximumpermitted length of backup name is 49 characters.The parameter can be overridden by the--backup-name option of the BACKUP subcommand. If thisparameter is omitted from the BART configuration file, and the--backup-name option with a user-defined name is notspecified with the BACKUP subcommand, then the backup can onlybe referenced in BART subcommands by the BART assigned,integer backup identifier.

    Continued on next page

    3.3. Configuring the Database Server 17

  • BART Installation and Upgrade Guide, Release 2.5.4

    Table 3.2 – continued from previous pageParameters/Placeholder Descriptionhost (mandatory) Specify the IP address of the database server to be configured for

    backup.port (mandatory)

    Specify the port number identifying the database server instance(that is, the relevant database cluster) to be backed up. The defaultport number for EPAS is 5444 and for Postgres it is 5432.The port parameter setting is only required if the database serverlistens on a port other than the default value.

    User (mandatory)Specify the replication database user name used by BART toestablish the connection to the database server for full backups.See Setting up a Replication Database User for more information.

    (optional)Specify the path where archived WAL files will be stored.The default location is the BART backup catalog(//archived_wals).

    (optional)When the INIT subcommand is used, the content and variablesspecified in the BART result in thearchive command string to be generated into the Postgresarchive_command parameter in thepostgresql.auto.conf file.To configure the BART parameter,enclose the command string within single quotes (‘). If you do notspecify the parameter in theconfiguration file, the default setting is taken as 'scp %p%h:%a/%f'. See Archive Command Auto Configuration forinformation about variables.The BART parameter in the BARTconfiguration file, and the Postgres parameter in the postgresql.conf file (or thepostgresql.auto.conf file) refer to two differentparameters that are to be set in different manners.

    (required)Specify the Linux operating system user account that owns thedatabase cluster.This is typically enterprisedb for Advanced Server databaseclusters installed in the Oracle compatible mode, or postgresfor Advanced Server database clusters installed in the PostgreSQLcompatible mode and PostgreSQL database clusters.

    Continued on next page

    3.3. Configuring the Database Server 18

  • BART Installation and Upgrade Guide, Release 2.5.4

    Table 3.2 – continued from previous pageParameters/Placeholder Description (optional)

    Specify the IP address of the remote server to which a backup is tobe restored. Specify this parameter in the form of@. is the user account on the target databaseserver host that accepts a passwordless SSH/SCP login connectionand owns the directory where the backup is to be restored. is the IP address of the remotehost.For restoring a backup to a remote host or for restoring any backupwhere and the BART user account are not thesame users, either this parameter must be set or it may be specifiedwith the -r option with the BART RESTORE subcommand.

    (optional) Specify path to which tablespaces are to be restored in the formatOID = ; If the backup is to be restored toa remote host specified by the parameter, thenthe tablespace paths must exist on the remote host.

    allow_incremental_backups(optional) Set this parameter to enabled to enable use of the WAL scanner

    and permit taking incremental backups when the BACKUPsubcommand is invoked with the --parent option.Set it to disabled (default) to disallow incremental backups andthus permit only full backups.For information about using the BACKUP subcommand andrunning the WAL scanner, please see the EDB Postgres Backupand Recovery User Guide available at this page.

    Description (optional) Specify the description that will be used to identify the databaseserver.

    For information regarding how to configure the following parameters, see configuring the BART host.

    • retention_policy

    • xlog_method

    • wal_compression

    • copy_wals_during_restore.

    • thread_count.

    • batch_size.

    • scan_interval.

    • mbm_scan_timeout.

    • workers

    Backup Name Template

    • The template is an alphanumeric string that may include the following variables that will be replaced with thetimestamp values when the backup is taken:

    – %year to be replaced by 4-digit year

    3.3. Configuring the Database Server 19

    https://www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    – %month to be replaced by 2-digit month

    – %day to be replaced by 2-digit day

    – %hour to be replaced by 2-digit hour

    – %minute to be replaced by 2-digit minute

    – %second to be replaced by 2-digit second

    • To include a percent sign (%) as a character in the backup name, specify %% in the template.

    • Do not enclose the template string in quotes even if you want the template to include space characters, otherwisethe enclosing quotes are stored as part of the backup name. However, when referenced with the -i option byBART subcommands use of space characters in the backup name requires enclosing the backup name in quotes.

    The following example shows the configuration settings of three database servers:

    [ACCTG]

    host = 127.0.0.1port = 5444user = enterprisedbcluster_owner = enterprisedbbackup_name = acctg_%year-%month-%dayT%hour:%minute:%secondarchive_command = 'cp %p %a/%f'allow_incremental_backups = enabledretention_policy = 8 BACKUPSdescription = "Accounting"

    [MKTG]

    host = 192.168.2.24port = 5444user = repusercluster_owner = enterprisedbremote_host = [email protected]_incremental_backups = enableddescription = "Marketing"

    [HR]

    host = 127.0.0.1port = 5432user = postgrescluster_owner = postgresretention_policy = 4 DAYSdescription = "Human Resources"

    3.3.4 Enabling WAL Archiving

    WAL archiving must be enabled for the database server for which BART is to perform backup and recovery manage-ment.

    • The WAL Archiving Configuration section describes the manual WAL archiving configuration process.

    • The Archive Command Auto Configuration section describes an automated WAL archiving process.

    WAL Archiving Configuration

    Set the following configuration parameters in the postgresql.conf file to enable WAL archiving

    3.3. Configuring the Database Server 20

  • BART Installation and Upgrade Guide, Release 2.5.4

    • Set wal_level to archive for Postgres 9.5 or to replica for Postgres 9.6 or later.

    • Set archive_mode to on.

    • Set the PostgreSQL archive_command parameter to copy the WAL files to the archive_path. Thearchive_command configuration parameter mentioned here is located in the postgresql.conf file; thePostgreSQL archive_command parameter is used in a different manner than the BART archive_command.

    • Set max_wal_senders to a value high enough to leave at least one session available for the backup. If thexlog_method=stream parameter setting is to be used by this database server, the max_wal_senderssetting must account for an additional session for the transaction log streaming (the setting must be a minimumof 2). See Configuring the BART host for information about the xlog_method parameter.

    For detailed information about WAL archiving, see the PostgreSQL Core Documentation.

    The ARCHIVE PATH field displayed by the BART SHOW-SERVERS subcommand displays the full directory pathwhere the WAL files should be copied as specified in the archive_command configuration parameter in thepostgresql.conf file:

    -bash-4.1$ bart SHOW-SERVERS -s acctgSERVER NAME : acctgHOST NAME : 192.168.2.24USER NAME : repuserPORT : 5444REMOTE HOST :RETENTION POLICY : noneDISK UTILIZATION : 0.00 bytesNUMBER OF ARCHIVES : 0ARCHIVE PATH : /opt/backup/acctg/archived_walsARCHIVE COMMAND : (disabled)XLOG METHOD : fetchWAL COMPRESSION : disabledTABLESPACE PATH(s) :INCREMENTAL BACKUP : DISABLEDDESCRIPTION : "Accounting"

    The parameter settings in the following example will copy the WAL files to a directory named /opt/backup/acctg/archived_wals on the BART host located at 192.168.2.22 as the bartuser user account. Usingthe bartuser account ensures that the operation will have sufficient permissions to copy to the BART backup catalogowned by bartuser.

    wal_level = archive # minimal, archive, or hot_standby# (change requires restart)

    ...

    archive_mode = on # allows archiving to be done# (change requires restart)

    archive_command = 'scp %p [email protected]:/opt/backup/acctg/archived_wals/%f'# command to use to archive a logfile segment# placeholders: %p = path of file to archive# %f = file name only

    ...

    max_wal_senders = 1 # max number of walsender processes# (change requires restart)

    The database server must be restarted in order to initiate WAL archiving, but do not do so until you have verified thatthe full path of the BART backup catalog has been created by some prior BART subcommand or the archive operationwill fail.

    3.3. Configuring the Database Server 21

    https://www.postgresql.org/docs/current/static/continuous-archiving.html

  • BART Installation and Upgrade Guide, Release 2.5.4

    Start the WAL scanner by executing the following command:

    ./bart-scanner

    Archive Command Auto Configuration

    To enable WAL archiving:

    • In the postgresql.conf file, set the wal_level to archive for Postgres 9.5 or to replica for Post-gres 9.6 or later, set the archive_mode to on, and set max_wal_senders to a value high enough to leaveat least one session available for the backup. If the xlog_method=stream parameter setting is to be usedby this database server as determined in the BART configuration file, the max_wal_senders setting mustaccount for an additional session for the transaction log streaming (that is, the setting must be a minimum of 2).See Configuring the BART host for information on the xlog_method parameter.

    • Configure the Postgres archive_command parameter automatically with the INIT subcommand and restartthe database server when you are ready to initiate WAL archiving. The INIT subcommand invokes thePostgres ALTER SYSTEM command to set the Postgres archive_command configuration parameter inthe postgresql.auto.conf file located in the managed database server’s POSTGRES_INSTALL_HOMEdata directory. For additional information about the INIT subcommand, see the EDB Postgres Backupand Recovery User Guide.

    The archive command string that the INIT subcommand generates into the postgresql.auto.conf fileis determined by the parameter setting of the BART archive_command parameter in the server section ofthe BART configuration file. If the BART archive_command parameter is not set in the server section for agiven database server, the command string that is configured uses the following default format:

    'scp %p %h:%a/%f'

    The following table describes these variables:

    Variable Description%p The path of the file to archive used by the Postgres archiving process.%h Will be replaced by the @ as specified in the

    parameter setting.%a

    Will be replaced by the BART archived_wals directory as specified in the archivepath parameter setting.If the is not specified, then the default directory is//archived_wals. is thelowercase conversion of the database server name.

    %f The archived file name used by the Postgres archiving process.

    The placeholders %h and %a are replaced by the INIT subcommand when creating the archive command string. Theplaceholders %p and %f are not replaced by the INIT subcommand, but are kept as given to be used by the Postgresarchiving process.

    For example, to use the default archive command format, the BART configuration file contains the following settingswhere the BART archive_command parameter is omitted from the server section for ACCTG:

    [BART]

    bart_host= [email protected]_path = /opt/backuppg_basebackup_path = /usr/edb/as11/bin/pg_basebackuplogfile = /tmp/bart.logscanner_logfile = /tmp/bart_scanner.log

    3.3. Configuring the Database Server 22

    https://www.enterprisedb.com/edb-docs/https://www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    [ACCTG]

    host = 127.0.0.1port = 5444user = repusercluster_owner = enterprisedbdescription = "Accounting"

    The INIT subcommand is invoked by BART user account bartuser as follows:

    [bartuser@localhost ~]$ bart INIT -s acctg -oINFO: setting archive_command for server 'acctg'WARNING: archive_command is set. server restart is required

    If the BART backup catalog directory is not already complete, it will be completed.

    The resulting archive command string in the postgresql.auto.conf file located in the managed databaseserver’s POSTGRES_INSTALL_HOME/data directory appears as follows:

    # Do not edit this file manually!# It will be overwritten by ALTER SYSTEM command.archive_command = 'scp %[email protected]:/opt/backup/acctg/archived_wals/%f'

    Run the INIT subcommand with the -o option to override any existing archive_command setting in thepostgresql.conf or the postgresql.auto.conf file. In addition, the -o option must be used to gen-erate the command string if the archive_mode is set to off even if there are no existing settings of thearchive_command in the postgresql.conf or postgresql.auto.conf files.

    In this example, the following BART configuration file is used with an explicit setting of the BARTarchive_command parameter:

    [BART]

    bart_host= [email protected]_path = /opt/backuppg_basebackup_path = /usr/edb/as11/bin/pg_basebackuplogfile = /tmp/bart.logscanner_logfile = /tmp/bart_scanner.log

    [ACCTG]

    host = 127.0.0.1port = 5444user = repusercluster_owner = enterprisedbarchive_command = 'cp %p %a/%f'description = "Accounting"

    The INIT subcommand is invoked by BART user account enterprisedb as follows:

    -bash-4.1$ bart INIT -s acctg -oINFO: setting archive_command for server 'acctg'WARNING: archive_command is set. server restart is required

    The resulting Postgres archive_command parameter in the postgresql.auto.conf file appears as follows:

    3.3. Configuring the Database Server 23

  • BART Installation and Upgrade Guide, Release 2.5.4

    # Do not edit this file manually!# It will be overwritten by ALTER SYSTEM command.archive_command = 'cp %p /opt/backup/acctg/archived_wals/%f'

    When the database server has been restarted, the ARCHIVE COMMAND field of the SHOW-SERVERS subcommanddisplays the active Postgres archive command as shown by the following example:

    -bash-4.1$ bart SHOW-SERVERS -s acctgSERVER NAME : acctgHOST NAME : 127.0.0.1USER NAME : repuserPORT : 5444REMOTE HOST :RETENTION POLICY : noneDISK UTILIZATION : 48.00 MBNUMBER OF ARCHIVES : 0ARCHIVE PATH : /opt/backup/acctg/archived_walsARCHIVE SCOMMAND : `cp %p /opt/backup/acctg/archived_wals/%f`XLOG METHOD : fetchWAL COMPRESSION : disabledTABLESPACE PATH(s) :INCREMENTAL BACKUP : DISABLEDDESCRIPTION : "Accounting"

    3.3. Configuring the Database Server 24

  • BART Installation and Upgrade Guide, Release 2.5.4

    3.3.5 Verifying Configuration Settings

    To verify the parameter settings of the database server specified, execute tthe CHECK-CONFIG subcommand with the-s option:

    bart CHECK-CONFIG [ -s server_name ]

    The CHECK-CONFIG subcommand confirms the following:

    • The cluster_owner parameter is set to the user account owning the database cluster directory.

    • A passwordless SSH/SCP connection is set between the BART user and the user account specified by thecluster_owner parameter.

    • The BART user parameter specifies a database superuser.

    • The BART user has access to the backup directory catalog.

    • The pg_hba.conf file contains a replication entry for the database superuser specified by the BART userparameter.

    • The archive_mode parameter in the postgresql.conf file is enabled.

    • The archive_command parameter in the postgresql.auto.conf or the postgresql.conf file isset.

    • The allow_incremental_backups parameter in the BART configuration file is enabled for databaseservers for which incremental backups are to be taken.

    • Archiving of WAL files to the archive_path is in process.

    • The WAL scanner program is running.

    After configuring the BART host and the database server(s), you can start using BART. For information about usingBART, see the EDB Postgres Backup and Recovery User Guide.

    3.3. Configuring the Database Server 25

    https://www.enterprisedb.com/edb-docs/

  • CHAPTER 4

    Troubleshooting

    This section provides a workaround for the following installation issues:

    Installing EPEL

    Error: Cannot retrieve metalink for repository: epel. Please verify its pathand try again

    To fix this issue:

    1. In the /etc/yum.repos.d/epel.repo file, comment out all entries starting with mirrorlist=...and un-comment all entries starting with baseurl=.....

    2. In the /etc/yum.repos.d/epel-testing.repo file, comment out all entries starting withmirrorlist=... and un-comment all entries starting with baseurl=.....

    After editing these files, install epel-release again.

    Error: yum.pid

    existing lock /var/run/yum.pid: another copy is running as pid 3104. Anotherapp is currently holding the yum lock; waiting for it to exit

    To fix this issue, execute the following command:

    rm -f /var/run/yum.pid

    26

  • CHAPTER 5

    Upgrading BART

    This section outlines the process of upgrading BART from an existing version to the latest version.

    • Upgrading from BART 2.0 describes the upgrade process from BART 2.0 to the latest version.

    • Upgrading from Older Versions of BART (except 2.0) describes the upgrade process from previous BART ver-sions (except 2.0) to the latest version.

    Upgrade Restrictions

    The following restrictions apply with regard to previous BART versions.

    • You can take incremental backups using the latest version only when the parent backup (full or incrementalbackup) has also been taken with the latest version.

    • Using the latest version, you can restore incremental backups that are taken only with the latest version of BART.However, using the latest version you can restore full backups that were taken with older versions.

    27

  • BART Installation and Upgrade Guide, Release 2.5.4

    5.1 Upgrading from Older Versions of BART (except 2.0)

    Perform the following steps to upgrade from older versions of BART (except 2.0) to the latest version:

    Step 1: Assume the identity of the BART user account and invoke the following command to stop the BART WALscanner program (bart-scanner):

    bart-scanner STOP

    Step 2: As the root user, upgrade to the latest BART version with the following platform-specific command.

    • To upgrade the BART RPM package directly from the EDB Yum Repository website, specify only the packagename:

    On CentOS 6 and 7:

    yum upgrade edb-bart

    You can also use a downloaded RPM package file to upgrade. To use a downloaded BART RPM package file toupgrade, use the following command, specifying the complete RPM package file name:

    yum upgrade edb-bart-2.5.4 rhel7.x86_64.rpm

    Step 3: Repeat the process described in this section to upgrade to BART 2.5.4 on each remote hosts where an incre-mental backup will be restored.

    For additional information about restoration of incremental backups on remote hosts, see the EDB Postgres Backupand Recovery User Guide available at this page.

    Step 4: If the bart --version command returns an error stating the PATH is not available after switching fromroot user to another BART user account, adjust the setting of the PATH environment variable to include the loca-tion of the BART 2.5.4 executable (the bin subdirectory) in the ~/.bashrc or ~/.bash_profile files of thefollowing user accounts:

    • The BART user account on the BART host.

    • The remote user account on the remote host to which incremental backups are to be restored. For details, seethe EDB Postgres Backup and Recovery User Guide available at this page.

    The PATH setting should be the same as set for BART 2.5.4 since all versions use /usr/edb/bart/bin.

    Note: After upgrading to BART 2.5.4, you must take a new full backup of your system before performing anincremental backup.

    5.1. Upgrading from Older Versions of BART (except 2.0) 28

    https://www.enterprisedb.com/edb-docs/https://www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    5.2 Upgrading from BART 2.0

    Perform the following steps to upgrade BART 2.0 to the latest version of BART:

    Step 1: Install the latest version of BART. For information about how to install, see Using an RPM Package to InstallBART .

    Step 2: Save a copy of your BART 2.0 configuration file. The default location of the BART 2.0 configuration file is/usr/edb/bart2.0/etc/bart.cfg.

    Step 3: Invoke the following command to remove BART 2.0:

    On CentOS 6 and 7:

    yum remove edb-bart20

    Step 4: Place the BART 2.0 configuration file (bart.cfg) that you saved in Step 2 in the newly created /usr/edb/bart/etc directory. You can use many of the same configuration parameters for BART 2.5.4, but note thatyou must use a new directory for the BART backup catalog. A new set of full backups and incremental backups takenusing BART 2.5.4 must be stored in a new BART backup catalog.

    To specify an alternative configuration file name or location, use the -c option with BART subcommands. For moreinformation about the -c option, see the EDB Postgres Backup and Recovery User Guide available at this page.

    Note: The bart.cfg configuration file is only required on the BART 2.5.4 host from which you will invoke BARTsubcommands. BART does not require the bart.cfg file on hosts on which an incremental backup will be restored.

    Step 5: Adjust the setting of the PATH environment variable to include the location of the BART 2.5.4 executable (thebin subdirectory) in the ~/.bashrc or ~/.bash_profile files for the following user accounts:

    • The BART user account on the BART host.

    • The user account on the remote host to which incremental backups will be restored. For details, see the EDBPostgres Backup and Recovery User Guide available at this page.

    Step 6: Perform the BART 2.5.4 installation and BART 2.0 removal process on each remote host on which an incre-mental backup was restored using BART 2.0.

    Note: After upgrading to BART 2.5.4, you must take a new full backup of your system before performing anincremental backup.

    5.2. Upgrading from BART 2.0 29

    https://www.enterprisedb.com/edb-docs/https://www.enterprisedb.com/edb-docs/

  • CHAPTER 6

    Uninstalling BART

    This section walks you through uninstalling BART.

    6.1 Uninstalling BART on a RHEL/CentOS Host

    To uninstall BART on a RHEL/CentOS host, assume the identity of the root user and invoke the following command:

    On RHEL or CentOS 6 and 7:

    yum remove edb-bart

    On RHEL or CentOS 8:

    dnf remove edb-bart

    Uninstalling BART does not delete the backup files and archived WAL files that reside in the BART backup catalog.To permanently delete the backup files and archived WAL files in the BART backup catalog (/opt/backup), useone of the follwing commands:

    • rm -rf /opt/backup

    • BART DELETE subcommand

    For information about the BART DELETE subcommand, refer the EDB Postgres Backup and Recovery User Guideavailable at this page.

    6.2 Uninstalling BART on an SLES 12 Host

    To uninstall BART on an SLES 12 host, assume the identity of the root user and invoke the following command:

    zypper remove edb-bart

    30

    https://www.enterprisedb.com/edb-docs/

  • BART Installation and Upgrade Guide, Release 2.5.4

    6.3 Uninstalling BART on a Debian/Ubuntu Host

    To uninstall BART on a Debian or Ubuntu host, invoke the following command:

    apt-get remove edb-bart

    6.3. Uninstalling BART on a Debian/Ubuntu Host 31

  • CHAPTER 7

    Conclusion

    EDB Postgres Backup and Recovery Installation and Upgrade Guide

    Copyright © 2014 - 2020 EnterpriseDB Corporation.

    All rights reserved.

    EnterpriseDB® Corporation

    34 Crosby Drive, Suite 201, Bedford, MA 01730, USA

    T +1 781 357 3390 F +1 978 467 1307 E

    [email protected]

    www.enterprisedb.com

    • EnterpriseDB and Postgres Enterprise Manager are registered trademarks of EnterpriseDB Corporation. EDBand EDB Postgres are trademarks of EnterpriseDB Corporation. Oracle is a registered trademark of Oracle, Inc.Other trademarks may be trademarks of their respective owners.

    • EDB designs, establishes coding best practices, reviews, and verifies input validation for the logon UI for EDBPostgres product where present. EDB follows the same approach for additional input components, however thenature of the product may require that it accepts freeform SQL, WMI or other strings to be entered and submittedby trusted users for which limited validation is possible. In such cases it is not possible to prevent users fromentering incorrect or otherwise dangerous inputs.

    • EDB reserves the right to add features to products that accept freeform SQL, WMI or other potentially dangerousinputs from authenticated, trusted users in the future, but will ensure all such features are designed and tested toensure they provide the minimum possible risk, and where possible, require superuser or equivalent privileges.

    • EDB does not that warrant that we can or will anticipate all potential threats and therefore our process cannotfully guarantee that all potential vulnerabilities have been addressed or considered.

    32

    mailto:[email protected]

  • Index

    AAdding a Database Server to the BART Configuration

    File, 17Archive_Command_auto_configuration, 22Authorizing SSH/SCP Access, 14

    BBART host components, 1

    CConclusion, 32Configuring BART, 7Configuring the BART Host, 8Configuring the Database Server, 14

    EEnabling WAL Archiving, 20Establishing the BART User Account, 7

    IInstalling BART, 2Installing BART on a CentOS/RHEL Host, 2Installing BART on a Debian or Ubuntu Host, 5Installing BART on an SLES 12 Host, 6

    LLimitation, 1

    PPrerequisites, 1

    RRequirements Overview, 1

    SSetting up a Replication Database User, 16Software Requirements, 1Supported Platforms and Database Versions, 1

    TTroubleshooting, 26

    UUninstalling BART, 30Uninstalling BART on a Debian/Ubuntu Host, 31Uninstalling BART on a RHEL/CentOS Host, 30Uninstalling BART on an SLES 12 Host, 30Upgrading BART, 27Upgrading from BART 2.0, 29Upgrading from Older Versions of BART (except 2.0), 28

    VVerifying Configuration Settings, 25

    33

    Requirements OverviewSupported Platforms and Database VersionsSoftware RequirementsLimitation

    Installing BARTInstalling BART on a CentOS/RHEL HostInstalling BART on a Debian or Ubuntu HostInstalling BART on an SLES 12 Host

    Configuring BARTEstablishing the BART User AccountConfiguring the BART HostConfiguration Parameter Reference

    Configuring the Database ServerAuthorizing SSH/SCP AccessSetting up a Replication Database UserAdding a Database Server to the BART Configuration FileDatabase Server Parameter Reference

    Enabling WAL ArchivingVerifying Configuration Settings

    TroubleshootingUpgrading BARTUpgrading from Older Versions of BART (except 2.0)Upgrading from BART 2.0

    Uninstalling BARTUninstalling BART on a RHEL/CentOS HostUninstalling BART on an SLES 12 HostUninstalling BART on a Debian/Ubuntu Host

    ConclusionIndex