Resolving "Integer is Expected" error in Backup Where page

Purpose:

This article delves into a specific error where an "integer is expected" exception disrupts the backup process. Users often face this issue when returning to the backup set after configuring the staging area. The article aims to provide a workaround for this problem and offer a clear, step-by-step solution.

Description:

1. In the staging area's Advanced Options, the validation for flush scheduled, flush at, and taper flush values is lenient, accepting string values. This allows for a seemingly successful backup run.

image-20240124-070940

2. However, when navigating back to the backup set and attempting the next backup, an "integer is expected" exception is thrown. For instance, an error like this may occur:

ERROR -> /etc/amanda/<backup set>/binding-tapeStorage.conf an integer is expected

image-20240124-070838

3. The binding YAML file binding-<storageDevice>.yml, located at /etc/amanda/<backup-set>/, contains (' ') for flush_threshold_scheduled, taper_flush, and flush_at. If any of these fields is entered as a string, it is treated as such in the binding file.

For example, entering a string value for flush_scheduled would reflect as shown below:

image-20240124-070900

Solution:

Step 1: Change in binding YAML file:

  • Modify the values of flush_threshold_scheduled, taper_flush, and flush_at in the binding YAML file to integer values if currently set as strings.

  • In the Zmanda Management Console (ZMC) database, there is a table called backupsets_backupstaging. If any of these fields were entered as a string within this table, the corresponding value would be set to NULL. This NULL value represents the default state for those fields.

Step 2: Update database values:

Note: Ensure root user privileges when executing these commands.

  • Access the ZMC database using the command:

/opt/zmanda/amanda/bin/mysql ZMC
  • Retrieve details of the specific backup set causing the error:

select * from backupsets_backupstaging where backupset_name="<backup set name>";
  • If null values are found in flush_threshold_scheduled, flush_threshold_dumped, or taperflush, change them to their default values using an update query. Default values: flush_threshold_dumped = 50, flush_threshold_scheduled = 100, taperflush = 100, or any integer value based on your needs.

  • Update the query for default values:

update backupsets_backupstaging set flush_threshold_scheduled=100, flush_threshold_dumped=50, taperflush = 100 where backupset_name="<backup set name>";

By following the provided steps, users can resolve the issue and maintain a reliable backup process.