What can I do if I encounter a "Not a valid directory" error in HBS?


Last modified date: 2023-12-07

Applicable Products

Hybrid Backup Sync


Cause

In Hybrid Backup Sync (HBS), if you encounter the error message "Not a valid directory. Attempting to retry. Error code: -20" when running a backup job, this indicates that the source folder contains subfolders that have a space character at the end of the folder name (for example, "/source_folder/folder_name_with_space_at_the_end /").


Solution

In File Station, it is impossible to determine whether a folder name has trailing spaces just by looking at the name. The only way is to manually edit the folder name first. This is manageable if you only have a few subfolders. However, if there are too many subfolders, you can obtain a list of the affected subfolders via SSH first.

  1. Note the source folder path in the backup job.
    1. Open HBS 3 on the NAS.
    2. Go to Backup & Restore.
    3. Locate and click the backup job.
    4. Note the source path next to Source.
  2. Optional: Obtain the list of affected subfolders via SSH.
    1. Access the NAS via SSH on your computer.
      For details, see How do I access my QNAP NAS using SSH?
    2. Go to the source folder of the backup job by entering the following command.
      # Replace "/Public/source_folder/" with your source folder path:
      cd /Public/source_folder/
    3. Obtain the list of subfolders that have a space at the end of the folder name.
      find -name "* " -type d
  3. Rename the affected subfolders.
    1. Open File Station on the NAS.
    2. Go to an affected subfolder.
    3. Right-click the subfolder and select Rename.
      The Rename window opens.
    4. Remove all spaces at the end of the name.
    5. Click OK.
    6. Repeat the above steps for each affected subfolder.

You can now run the backup job again.

Was this article helpful?

25% of people think it helps.
Thank you for your feedback.

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Choose specification

      Show more Less

      Choose Your Country or Region

      open menu
      back to top