NAS540 rsync job fails because of TAB character added to module name during configuration

Frost
Frost Posts: 6  Freshman Member
First Anniversary
edited June 2020 in Personal Cloud Storage
NAS540 / V5.21(AATB.5): I try to set up a backup job in Backup Planner to rsync volume (in disk group) to a linux rsync server (Debian 10 in this case).


#NAS_June_2020

Comments

  • Frost
    Frost Posts: 6  Freshman Member
    First Anniversary
    (... and after accidental ENTER...)
    The problem is that the backup job fails immediately with an error 'Failed, error starting client-server protocol'.

    When I look the rsyncd log in linux there's a log line with

    ... unknown module 'volume_name_here    ' tried from ...

    A TAB character trails the volume name, which seems to be causing the failure as the module names do not match. Rsync server itself is functional because I managed to create a functional backup job for another volume. So I suspect a bug somewhere, possibly in web interface code.

    I have tried to search the BackupPlanner configuration file from NAS540 (with ssh), but so far haven't found it.


  • Frost
    Frost Posts: 6  Freshman Member
    First Anniversary
    edited June 2020
    I enabled the comment line in rsyncd.conf file for the failed volume and created a new backup job.

    Now rsyncd log line says after failure:

    ... unknown module 'volume_name_here  Testing' tried from ...

    There's the TAB after volume name and 'Testing' is the first word which I entered to the comment line in rsyncd.conf.

    So it seems that the UI picks unexpected cruft while in phase "3. Destination":

    When you select "Remote" (with IP and password) and "Show Target Content" button, you get a list of modules the rsync server offers. The list also shows the first word from the server comment field, and that is also included to module name. At least it is shown in 'Backup destination folder:' field after selection from list.

    If there is no server comment, you may get a TAB character - or not.


  • Sakura_T
    Sakura_T Posts: 101  Ally Member
    First Anniversary Friend Collector First Answer First Comment
    edited June 2020
    It seems not to allow put a TAB character in volume name.


    How did you make it? by command line? please correct me if I have any misunderstanding.
  • Frost
    Frost Posts: 6  Freshman Member
    First Anniversary
    edited June 2020
    I should have been more careful about 'volume' and 'module' in comments above (but that's what you cat get writing things while being tired). Also the subject line may be not the best one. Sorry about that.

    It's not at all about the Disc Group volume name. NAS disk volumes already exists, work, and their names contains only valid characters.

    It's about Backup Planner:

    I'm trying to do a backup job (Add a new backup job) with Type: rsync.

    Source selection goes as expected.

    Destination selection: Remote (IP address + password -> Show Target Content) lists correctly rsync module names (which are red from rsync server). If module comment is enabled (in server), list also shows only the first word from the module comment, regardless it's true word count.

    GUI allows to select the module name from the list and copies it's name to Backup destination folder: field.

    But GUI (or logic behind it) appends a TAB character after the destination module name while doing this. Not always, it seems not be consistent as I managed to do couple working rsync configurations (after a few tries) for two other volumes.
    GUI also adds the first word from the module comment (if that was enabled) to the destination module name and shows it in Backup destination folder: field.

    Eg. correct "rsync_module_name" becomes incorrect "rsync_module_name[[TAB][comment word]]"

    This of course does not match the (linux) rsyncd.conf module name and you cannot add a TAB character in rsyncd.conf (which also would be a bit silly idea).
    Therefore I'd like to find the NAS configuration files for BackupManager to see what they contain, after GUI has saved the backup configuration. Maybe try to hotfix it from there to get rsync finally working.

    Or to get proper fix for this.

  • Frost
    Frost Posts: 6  Freshman Member
    First Anniversary
    edited June 2020
    Hotfix:
    The configuration file for BackupManager is /etc/zyxel/backupjob.db, which is a sqlite file.

    I copied this file to my Ubuntu desktop via Zyxel volume shares, used DB Browser for SQLite (version 3.10.1 in my case) to see whats inside. Changed file's ownership and access rights during the process accordingly.

    DB Browser confirmed what I suspected: Failed rsync job field TargetPath contained space + TAB characters in the middle as successful rsync jobs had none. Eg.
    module_name/ vs. module_name[space][TAB]/

    I removed those two characters from failed TargetPath field, saved the DB file and transferred it back to Zyxel (taking care of ownership and access rights).

    And lo and behold: When I started the Backup Planner and pressed Backup Now button for previously failed rsync job, the rsync started successfully and is transferring data as I write this.

    There's definitely a bug which should be fixed.
  • Dash
    Dash Posts: 65  Ally Member
    I use DeltaCopy as the rsync Server and backup the data from my PC.
    But I didn't occur any issue.This issue may relate to the rsync Server.

Consumer Product Help Center