Skip to main content

PostgreSQL Backup Set XML Template


PostgreSQL Backup Set XML Template (Raw)


<?xml version="1.0" encoding="UTF-8"?>
<Setting>
  <!-- This is the backup set setting -->
  <Key name="Backup Set Setting" allowMultiple="Y">
    <!-- Backup set type (Read Only) -->
    <Value data="PostgreSQL" name="Type" type="string" />
    <!-- Backup set name -->
    <Value data="" name="Name" type="string" />
    <!-- Temporary directory for storing backup files -->
    <Value data="" name="Temporary Working Directory" type="string" />
    <!-- Remove temporary files after backup -->
    <!-- Y: Yes -->
    <!-- N: No -->
    <Value data="Y" name="Delete temporary files after backup" type="boolean" />
    <!-- Select compression type -->
    <!-- GzipDefaultCompression : Normal -->
    <!-- GzipBestSpeedCompression: Fast (Compressed size larger than normal)-->
    <!-- SnappyDefaultCompression: Fast with optimization for local -->
    <!-- Leave the field blank for no compression -->
    <Value data="" name="Compression Type" type="string" />
    <!-- This shows the PostgreSQL Database setting -->
    <Key name="PostgreSQL Database Setting">
      <!-- PostgreSQL Login Name -->
      <Value data="" name="Username" type="string" />
      <!-- PostgreSQL Password -->
      <Value data="" name="Password" type="string" />
      <!-- PostgreSQL Host -->
      <Value data="" name="Host" type="string" />
      <!-- PostgreSQL Port -->
      <Value data="" name="Port" type="string" />
      <!-- Path to pg_dump -->
      <Value data="" name="postgresql pg_dump path" type="string" />
    </Key>
    <!-- This includes the database you want to backup -->
    <!-- Copy and paste the whole <Key> to add more selected sources -->
    <Key name="Selected Source" allowMultiple="Y">
      <!-- Please enter the path in the format of "PostgreSQL/_YOUR_FILE_NAME_" -->
      <Value data="" name="Path" type="string" />
    </Key>
    <!-- This excludes the database from the included source -->
    <!-- Copy and paste the whole <Key> to add more deselected sources -->
    <Key name="Deselected Source" allowMultiple="Y">
      <!-- Please enter the path in the format of "PostgreSQL/_YOUR_FILE_NAME_" -->
      <Value data="" name="Path" type="string" />
    </Key>
    <!-- Settings for your scheduled backups -->
    <Key name="Schedule Settings">
      <!-- Enable scheduled backup on this computer -->
      <!-- Y: Yes -->
      <!-- N: No -->
      <Value data="N" name="Enable" type="boolean" />
      <!-- Daily settings -->
      <!-- Copy and paste the whole <Key> to add more daily schedules -->
      <Key name="Daily Schedule Settings" allowMultiple="Y">
        <!-- Name of schedule -->
        <Value data="Daily-Schedule" name="Name" type="string" />
        <!-- Start hour -->
        <Value data="21" name="Hour" type="integer" />
        <!-- Start minute -->
        <Value data="0" name="Minute" type="integer" />
        <Value data="0" name="Minute" type="integer" />
        <!-- Interval -->
        <Value data="-1" name="Interval" type="integer" />
      </Key>
      <!-- Weekly settings -->
      <!-- Copy and paste the whole <Key> to add more weekly schedules -->
      <Key name="Weekly Schedule Settings" allowMultiple="Y">
        <!-- Name of schedule -->
        <Value data="Weekly-Schedule" name="Name" type="string" />
        <!-- Start hour -->
        <Value data="21" name="Hour" type="integer" />
        <!-- Start minute -->
        <Value data="0" name="Minute" type="integer" />
        <Value data="-1" name="Interval" type="integer" />
        <!-- Backup on these days of the week -->
        <Value data="Y" name="Sunday" type="boolean" />
        <Value data="Y" name="Monday" type="boolean" />
        <Value data="Y" name="Tuesday" type="boolean" />
        <Value data="Y" name="Wednesday" type="boolean" />
        <Value data="Y" name="Thursday" type="boolean" />
        <Value data="Y" name="Friday" type="boolean" />
        <Value data="Y" name="Saturday" type="boolean" />
      </Key>
      <!-- Monthly settings -->
      <!-- Copy and paste the whole <Key> to add more monthly schedules -->
      <Key name="Monthly Schedule Settings" allowMultiple="Y">
        <!-- Name of schedule -->
        <Value data="Monthly-Schedule" name="Name" type="string" />
        <Value data="21" name="Hour" type="integer" />
        <Value data="0" name="Minute" type="integer" />
        <Value data="1" name="Schedule Date" type="integer" />
        <Value data="First" name="Occurrence" type="string" />
        <Value data="Friday" name="Criteria" type="string" />
      </Key>
      <!-- Custom settings -->
      <!-- Copy and paste the whole <Key> to add more custom schedules -->
      <Key name="Custom Schedule Settings" allowMultiple="Y">
        <Value data="Custom" name="Name" type="string" />
        <Value data="21" name="Hour" type="integer" />
        <Value data="0" name="Minute" type="integer" />
        <Value data="2022-2-4" name="Schedule Date" type="string" />
      </Key>
    </Key>
    <!-- This is the collection of destinations -->
    <Key name="Destination Settings">
      <Value data="1" name="concurrency-level" type="integer" />
      <!-- AhsayCBS destination is where the files are backup to server -->
      <Key name="AhsayCBS Destination Settings" allowMultiple="Y">
      </Key>
      <!-- Local destination means backup files are stored in your computer -->
      <Key name="Local Destination Settings">
        <Value data="" name="Name" type="string" />
        <Value data="" name="Local Path" type="string" />
      </Key>
    </Key>
    <!-- Wasabi destination for storing files -->
    <Key name="Wasabi Destination Settings" allowMultiple="Y">
      <Value data="" name="Name" type="string" />
      <Value data="" name="Access Key" type="string" />
      <Value data="" name="Secret Key" type="string" />
      <Value data="" name="Region" type="string" />
      <Value data="" name="Bucket Name" type="string" />
      <Value data="N" name="Enable proxy during backup" type="boolean" />
    </Key>
    <!-- FTP destination for storing files -->
    <Key name="FTP Destination Settings" allowMultiple="Y">
      <Value data="" name="Name" type="string" />
      <Value data="" name="Host" type="string" />
      <Value data="0" name="Port" type="integer" />
      <Value data="" name="Username" type="string" />
      <Value data="" name="Password" type="string" />
      <Value data="" name="Directory" type="string" />
      <Value data="N" name="Enable proxy during backup" type="boolean" />
    </Key>
  </Key>
  <!-- This shows the deduplication setting -->
  <Key name="Deduplication Setting">
    <Value data="Y" name="Enable" type="boolean" />
    <Value data="B" name="Deduplication level" type="string" />
  </Key>
</Setting>


PostgreSQL Backup Set XML Template (with Explanation)

This appendix explains all configurable items with their available options, highlighted in red, in this file backup set XML scripts.

Backup Set Setting

The following items define the basic configurations of the file backup set.

  • Backup set type – Enter the backup set type, for instance, File, PostgreSQL, etc.
  • Backup set name – Name your backup set.
  • Temporary directory for storing backup files – Enter the directory path where you would like to have the backup files stored temporarily. This directory is used for various purposes, such as:
    • Storage of temporary spooled files (for database-specific backup type in AhsayOBM)
    • Remote file list
    • Local file list
    • Temporary delta file
    • Other files of temporary nature
  • Remove temporary files after backup – Choose whether to remove temporary files after you finish backup.
  • Select compression type – Choose the backup compression mode among:
    • Normal
    • Fast
    • Fast with optimization for local
    • No compression

<?xml version="1.0" encoding="UTF-8"?>
<Setting>
  <!-- This is the backup set setting -->
  <Key name="Backup Set Setting" allowMultiple=”Y”>
    <!-- Backup set type (Read Only) -->
    <Value data="PostgreSQL" name="Type" type="string" />
    <!-- Backup set name -->
    <Value data="" name="Name" type="string" />
    <!-- Temporary directory for storing backup files -->
    <Value data="" name="Temporary Working Directory" type="string" />
    <!-- Remove temporary files after backup -->
    <!-- Y: Yes -->
    <!-- N: No -->
    <Value data="Y" name="Delete temporary files after backup" type="boolean" />
    <!-- Select compression type -->
    <!-- GzipDefaultCompression : Normal -->
    <!-- GzipBestSpeedCompression: Fast (Compressed size larger than normal) -->
    <!-- SnappyDefaultCompression: Fast with optimization for local -->
    <!-- www.ahsay.com AhsayOBM PostgreSQL Backup and Restore Guide | 70 of 82 -->
    <!-- Leave the field blank for no compression -->
    <Value data="" name="Compression Type" type="string" />
  </Key>
</Setting>


PostgreSQL Server Setting

Configure the login and network settings for the PostgreSQL Database.


<!-- This shows the PostgreSQL Database setting -->
<Key name="PostgreSQL Database Setting">
  <!-- PostgreSQL Login Name -->
  <Value data="" name="Username" type="string" />
  <!-- PostgreSQL Password -->
  <Value data="" name="Password" type="string" />
  <!-- PostgreSQL Host -->
  <Value data="" name="Host" type="string" />
  <!-- PostgreSQL Port -->
  <Value data="" name="Port" type="string" />
  <!-- Path to pg_dump -->
  <Value data="" name=" postgresql pg_dump path" type="string" />
</Key>

Selected Source

Enter the file path where the files you would like to backup are located.


<!-- This includes the files you want to backup -->
<!-- Copy and paste the whole <Key> to add more selected sources -->
<Key name="Selected Source">
  <!-- Please enter your file path, e.g. /root/Documents -->
  <Value data="" name="Path" type="string" />
</Key>

Deselected Source

Enter the file path where files you would like to exclude from the backup.


<!-- This excludes the files from the included source -->
<!-- Copy and paste the whole <Key> to add more deselected sources -->
<Key name="Deselected Source">
  <!-- Please enter your file path, e.g. /root/Documents -->
  <Value data="" name="Path" type="string" />
</Key>

Schedule Settings

Choose whether you would like backup jobs to be run at the scheduled time you set.


<!-- Settings for your scheduled backups -->
<Key name="Schedule Settings">
  <!-- Enable scheduled backup on this computer -->
  <!-- Y: Yes -->
  <!-- N: No -->
  <Value data="N" name="Enable" type="boolean" />
</Key>

Daily Schedule Settings

Set backup jobs to run daily at the time you specified (start backup “at” or normal backup schedule) or at intervals of minutes/hours (start backup “every” or periodic backup schedule).

  • Name of schedule: Name of the backup schedule.
  • Start hour: The starting hour of the backup, from 0-23. This value will apply for normal backup schedule or start backup "at".
  • Start minute: The starting minute of the backup, from 0-59. This value will apply for normal backup schedule or start backup "at".
  • Interval: Frequency in minutes or hours when the backup would start, from 1-30 in minutes and 60-720 in hours. This value will apply for periodic backup schedule or start backup "every".

<!-- Daily settings -->
<!-- Copy and paste the whole <Key> to add more daily schedules -->
<Key name="Daily Schedule Settings">
  <!-- Name of schedule -->
  <Value data="Daily-Schedule" name="Name" type="string" />
  <!-- Start hour -->
  <!-- 0, 1, 2... 23 -->
  <!-- This value will be ignored if the schedule is set to be periodic ("Interval" field contains value other than -1) -->
  <Value data="21" name="Hour" type="integer" />
  <!-- Start minute -->
  <!-- 0, 1, 2... 59 -->
  <!-- This value will be ignored if the schedule is set to be periodic ("Interval" field contains value other than -1) -->
  <Value data="0" name="Minute" type="integer" />
  <!-- Interval -->
  <!-- 1 : 1 minute -->
  <!-- 2 : 2 minutes -->
  <!-- 3 : 3 minutes -->
  <!-- 4 : 4 minutes -->
  <!-- 5 : 5 minutes -->
  <!-- 6 : 6 minutes -->
  <!-- 10 : 10 minutes -->
  <!-- 12 : 12 minutes -->
  <!-- 15 : 15 minutes -->
  <!-- 20 : 20 minutes -->
  <!-- 30 : 30 minutes -->
  <!-- 60 : 1 hour -->
  <!-- 120: 2 hours -->
  <!-- 180: 3 hours -->
  <!-- 240: 4 hours -->
  <!-- 360: 6 hours -->
  <!-- 480: 8 hours -->
  <!-- 720: 12 hours -->
  <!-- A value of -1 means a non-periodic normal schedule -->
  <Value data="-1" name="Interval" type="integer" />
</Key>

Weekly Schedule Settings

Set backup jobs to run weekly at the time you specified (start backup “at” or normal backup schedule) or at intervals of minutes/hours (start backup “every” or periodic backup schedule).

  • Name of schedule: Name of the backup schedule.
  • Start hour: The starting hour of the backup, from 0-23. This value will apply for normal backup schedule or start backup "at".
  • Start minute: The starting minute of the backup, from 0-59. This value will apply for normal backup schedule or start backup "at".
  • Interval: Frequency in minutes or hours when the backup would start, from 1-30 in minutes and 60-720 in hours. This value will apply for periodic backup schedule or start backup "every".
  • Backup on these days of the week: Choose to enable or disable backup on each day in the week.

<!-- Weekly settings -->
<!-- Copy and paste the whole <Key> to add more weekly schedules -->
<Key name="Weekly Schedule Settings">
  <!-- Name of schedule -->
  <Value data="Weekly-Schedule" name="Name" type="string" />
  <!-- Start hour -->
  <!-- 0, 1, 2... 23 -->
  <!-- This value will be ignored if the schedule is set to be periodic ("Interval" field contains value other than -1) -->
  <Value data="21" name="Hour" type="integer" />
  <!-- Start minute -->
  <!-- 0, 1, 2... 59 -->
  <!-- This value will be ignored if the schedule is set to be periodic ("Interval" field contains value other than -1) -->
  <Value data="0" name="Minute" type="integer" />
  <!-- Interval -->
  <!-- 1 : 1 minute -->
  <!-- 2 : 2 minutes -->
  <!-- 3 : 3 minutes -->
  <!-- 4 : 4 minutes -->
  <!-- 5 : 5 minutes -->
  <!-- 6 : 6 minutes -->
  <!-- 10 : 10 minutes -->
  <!-- 12 : 12 minutes -->
  <!-- 15 : 15 minutes -->
  <!-- 20 : 20 minutes -->
  <!-- 30 : 30 minutes -->
  <!-- 60 : 1 hour -->
  <!-- 120: 2 hours -->
  <!-- 180: 3 hours -->
  <!-- 240: 4 hours -->
  <!-- 360: 6 hours -->
  <!-- 480: 8 hours -->
  <!-- 720: 12 hours -->
  <!-- A value of -1 means a non-periodic normal schedule -->
  <Value data="-1" name="Interval" type="integer" />
  <!-- Backup on these days of the week -->
  <!-- Y: Yes -->
  <!-- N: No -->
  <Value data="Y" name="Sunday" type="boolean" />
  <Value data="Y" name="Monday" type="boolean" />
  <Value data="Y" name="Tuesday" type="boolean" />
  <Value data="Y" name="Wednesday" type="boolean" />
  <Value data="Y" name="Thursday" type="boolean" />
  <Value data="Y" name="Friday" type="boolean" />
  <Value data="Y" name="Saturday" type="boolean" />
</Key>


Monthly Schedule Settings

Set backup jobs to run monthly at the time you specified.

  • Name of schedule: Name of the backup schedule.
  • Start hour: The starting hour of the backup, from 0-23.
  • Start minute: The starting minute of the backup, from 0-59.
  • Schedule date of month: Set exact date in a month when you would like the backup to perform. Set to 0 if you would like the backup performed in a specified occurrence + criteria format, e.g., the third Wednesday in month.
  • Backup [Occurrence + Criteria] format: You can set the backup to perform on a specified week (Occurrence, First / Second / Third / Last) and on a specified day of the week (Criteria, Sun thru Sat), for instance, the third Wednesday in a month.
    • Backup occurrence: Set the week, i.e., First / Second / Third / Last. If you have set an exact date in the previous “Schedule date of month” configuration, this setting will be ignored.
    • Backup criteria: Set a day of the week, i.e., Sunday thru Saturday. If you have set an exact date in the previous “Schedule date of month” configuration, this setting will be ignored.

<!-- Monthly settings -->
<!-- Copy and paste the whole <Key> to add more monthly schedules -->
<Key name="Monthly Schedule Settings">
  <!-- Name of schedule -->
  <Value data="Monthly-Schedule" name="Name" type="string" />
  <!-- Start hour -->
  <!-- 0, 1, 2... 23 -->
  <Value data="21" name="Hour" type="integer" />
  <!-- Start minute -->
  <!-- 0, 1, 2... 59 -->
  <Value data="0" name="Minute" type="integer" />
  <!-- Schedule date of month -->
  <!-- 1, 2, 3... 31 -->
  <!-- 32: Last -->
  <!-- Set to 0 if you want to use the format of occurrence + criteria, e.g. Third Wednesday, instead -->
  <Value data="1" name="Schedule Date" type="integer" />
  <!-- Backup occurrence -->
  <!-- First / Second / Third / Fourth / Last -->
  <!-- If "Schedule Date" is not zero, this value will be ignored -->
  <Value data="First" name="Occurrence" type="string" />
  <!-- Backup criteria -->
  <!-- Sunday / Monday / Tuesday / Wednesday / Thursday / Friday / Saturday / Weekday / Weekend -->
  <!-- If "Schedule Date" is not zero, this value will be ignored -->
  <Value data="Friday" name="Criteria" type="string" />
</Key>

Custom Schedule Settings

Set backup jobs to run at the date and time you specified.

  • Name of schedule: Name of the backup schedule.
  • Start hour: The starting hour of the backup, from 0-23.
  • Start minute: The starting minute of the backup, from 0-59.
  • Date for performing custom schedule backup: Enter a specific date when you would like the backup to perform. The date format should be in YYYY-MM-DD.

<!-- Custom settings -->
<!-- Copy and paste the whole <Key> to add more custom schedules -->
<Key name="Custom Schedule Settings">
  <!-- Name of schedule -->
  <Value data="Custom" name="Name" type="string" />
  <!-- Start hour -->
  <!-- 0, 1, 2... 23 -->
  <Value data="21" name="Hour" type="integer" />
  <!-- Start minute -->
  <!-- 0, 1, 2... 59 -->
  <Value data="0" name="Minute" type="integer" />
  <!-- Date for performing custom schedule backup -->
  <!-- Input in the format of YYYY-MM-DD -->
  <Value data="2016-4-30" name="Schedule Date" type="string" />
</Key>
</Key>

Destination Settings

  • AhsayCBS Destination Settings: This option allows backup files to be stored on the server.
  • Local Destination Settings: This option allows backup files to be stored in your local computer. Enter the directory path where you would like the backup files to be stored.

<!-- This is the collection of destinations -->
<Key name="Destination Settings">
  <Value data="1" name="concurrency-level" type="integer" />
  <!-- AhsayCBS destination is where the files are backup to server -->
  <Key name="AhsayCBS Destination Settings" allowMultiple=”Y”>
  </Key>
  <!-- Local destination means backup files are stored in your computer -->
  <!-- Copy and paste the whole <Key> to add more local destinations -->
  <Key name="Local Destination Settings">
    <!-- Name of your destination -->
    <Value data="" name="Name" type="string" />
    <!-- Directory to store your backup files -->
    <!-- e.g. /tmp -->
    <Value data="" name="Local Path" type="string" />
  </Key>
</Key>

Deduplication Setting

A checksum verification of each backup file which was split into several blocks of varying size will be performed to compare its content and identify which block is duplicated. There are 2 deduplication scope in this setting.

  • Same file path within the same backup set: Deduplication applies to the current backup job and it applies to duplicated contents within a file.
  • All files within the same backup set: Deduplication applies across different files in the backup set.

<!-- This shows the deduplication setting -->
<Key name="Deduplication Setting">
  <!-- Enable deduplication -->
  <!-- Y: Yes -->
  <!-- N: No -->
  <Value data="Y" name="Enable" type="boolean" />
  <!-- Deduplication scope -->
  <!-- F: Same file path within the same backup set -->
  <!-- B: All files within the same backup set -->
  <Value data="B" name="Deduplication level" type="string" />
</Key>
</Key>
</Setting>