NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Richard11's avatar
Richard11
Aspirant
Mar 15, 2014

OS6.1.6 - RSYNC does not accept any wildcards

FrontView in OS 6.1.6 is refusing to allow me to type any wildcards in the "File and directory name" to exclude box.

According to the rsync documentation, I should be able to pass it the * wildcard for simple globbing.
In my case, I want to exclude all directories starting with a ".", which I believe should be:
.*/

However, FrontView is simply refusing to accept any values containing the "*"wildcard.

I'm rather irritated because I've just spent the last few hours setting up an rsync server specifically to allow me to have automated backup that excludes files by wildcard, as the source contains a lot of (hidden) files that should not be copied.

Is there some other wildcard or place in the FrontView interface to use these?

In practice it is useless to exclude files if wildcards cannot be used, and it would appear that they have been deliberately prevented for some reason that I cannot understand.

4 Replies

Replies have been turned off for this discussion
  • Wow, what an awful design decision. More and more, OS6 impresses me less and less.

    If you were backing up to a local share or USB/eSATA drive, you could do this to fool the system into inserting an "exclude" option before the source directory:

    Source:
    Type: remote
    Name: remote: Rsync Server
    Host: --exclude '.[!.]*' Name_Of_Your_NAS (note, btw, that your " .* " wildcard isn't the best way to exclude hidden files and directories)
    Path: Your_Source_Path_With_No_Leading_Or_Trailing_Slashes

    Destination:
    Type: share
    Name: Your_Destination
    Path: Your_Path

    But if you want to backup to a remote rsync server, I don't see a way to get the "exclude" option into the right spot in the command line.

    If I were in your position, I'd give up on the toy backup interface and just SSH into the box and manually set up a cron job to do the backup. Or buy an OS4 device on Ebay.
  • I've asked Netgear support to explain themselves and when they will release a fix.

    In this case I've full control over the remote daemon so I set that to exclude, but this is most painful and wouldn't work if I was backing up another ReadyNAS.

    - And thanks very much for the clarification on the pattern I should use!
    • metapaso's avatar
      metapaso
      Apprentice

      It's now a year and a half later and I guess I should give up on holding my breath for wildcards to be included in the frontview (WebGUI) RSYNC backup on OS 6.

       

      However, I snooped around a bit on what's going on under the hood, and using htop on a running backup job I found that the WebGui is calling a command-line rsync with a separate --exclude=<your excluded path> items for each item in your exclude list.  For example, I have ".Spotlight-V100" and "CrashPlan_Inbound" as excluded items, and I see that the rsync runs as:

       

       

      rsync <some other options> --exclude=.Spotlight-V100 --exclude=CrashPlan_Inbound  <Source> <Dest>

      So at least you can look in the rsync documentation on apache.org to figure out how the exclusions are supposed to behave.  You don't get wildcards, but if you don't start with a / in the exclusion, the excluded will match to the end of any path, so just specifying ".Trashes" means that all the .Trashes files (or Folders) will be ignored in any subdirectory.  Exclusions therefore deserve caution, as you can inadvertently exclude any subdirectory or file named "Library" if you put "Library" in the exclusion list.

       

       

      It seems as though allowing wildcards should be programmatically trivial, so I went snooping into the frontview config files found in /etc/frontview.  Lo an behold there is a "backup_jobs.conf" file, which seems to be a plain-text xml file.  Well, peeking inside there I found the following weirdness:

       

       

      ...
      <opt_rsync_options>0</opt_rsync_options> <opt_email_this_to_alert_email>0</opt_email_this_to_alert_email> <opt_rsync_exclude>CrashPlan_Inbound,.Spotlight-V100,.DocumentRevisions-V100,.Trashes,.TemporaryItems,sparseimage,.fseventsd</opt_rsync_exclude> <opt_misc_option>0</opt_misc_option>
      ...

       

      Well, I'm no programmer or system administrator of any kind, and I know just about squat about XML, but I can tell you that you in this internet age, you probably shouldn't separate a list of items with commas, particularly if those items themselves have the possibility of containing commas (as filenames do).  And I have a sorta gut feeling that you really should NOT do this comma-separating thing in XML, particularly since presumeably you're using some kind of XML parser that can do a great job of reading nested XML tags.

       

       So, if you do ever get ahold of a tech at Netgear, can you ask them Why oh why the don't do something sensible like:

       

      ...
      <opt_rsync_options>0</opt_rsync_options> <opt_email_this_to_alert_email>0</opt_email_this_to_alert_email> <opt_rsync_exclude>
      <exclude_item>CrashPlan_Inbound</exclude_item>
      <exclude_item>.Spotlight-V100</exclude_item>
      <exclude_item>.DocumentRevisions-V100</exclude_item>
      <exclude_item>.Trashes</exclude_item>
      <exclude_item>.TemporaryItems</exclude_item>
      <exclude_item>sparseimage</exclude_item>
      <exclude_item>.fseventsd</exclude_item>
      </opt_rsync_exclude> <opt_misc_option>0</opt_misc_option>
      ...

       

      And then allow us to put in anything we want, including wildcards and commas, but excluding possibly the < > and & symbols reserved for xml?  That would sure go a LONG LONG way towards giving me some confidence that they know what they're doing over there at Netgear HQ, because right now, looking at this backup_jobs.conf file, I have about 0% confidence in their programming skills.

       

      Damon

      • metapaso's avatar
        metapaso
        Apprentice

        I meant to add also that I'm not myself ballsy enough to just manually edit the /etc/frontview/backup_jobs.conf file to include the wildcards, and my little RN316 is doing a significant amount of backup work so I don't want to risk downtime if things go haywire.  Perhaps there's someone out there brave enough (or who has a spare system to work on) to give it a try?

         

         I also want to be able to run a few specific rsync command-line options, so it seems it also might be possible to include your own --<option> in the "exclusion" list and since it's just fed into the command line, it will run as a command-line option?

         

        Damon

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More