1. Please help support our sponsors by considering their products and services.
    Our sponsors enable us to maintain high-speed Internet connection and fast webservers.
    They support this free information and knowledge exchange forum service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions

Network share backup exclude query

Discussion in 'Backup / Archive Discussion' started by Arrow, Jul 10, 2017.

  1. Arrow

    Arrow Active Newcomer

    Joined:
    Jul 7, 2017
    Messages:
    5
    Likes Received:
    0
    Hi all,

    I'm currently backing up a network share and it's working, however I want to be able to exclude some folders but cannot work out how to do this.

    For example, currently in my dsm.opt file I have DOMAIN "\\hostname\share$", the share has 3 folders (a, b, c) how do I set it so that only folder a gets backed up? I've tried EXCLUDE, EXCLUDE.DIR etc. but haven't had any luck.

    Thanks.
     
  2.  
  3. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,608
    Likes Received:
    370
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
    What's the full syntax you used in your option file?

    Typical exclusions like this where you only want the content of one directory is that you start by excluding everything, then include the one you want.

    Code:
    exclude \\hostname\share$\...\*
    include \\hostname\share$\b\...\*
    Note that include/excludes only apply to files, the directory structure will be backed up for the entire share, but only the files in \\hostname\share$\directory and subdirectories.
     
    Arrow likes this.
  4. Arrow

    Arrow Active Newcomer

    Joined:
    Jul 7, 2017
    Messages:
    5
    Likes Received:
    0
    Hi marclant, thanks for your help.

    This is what I currently have in my option file:

    DOMAIN "\\hostname\share$"
    exclude \\hostname\share$\...\*
    include \\hostname\share$\c\...\*

    This has not worked as I can see it is still backing up files from folders a&b instead of only files from folder c.

    What I've also noticed is that if the folder under the share (e.g. folder name) has a space in its name, I get the following error:

    ANS9989W Management class name\...\* specified on the INCLUDE statement in dsm.opt at line xx does not exist.
     
  5. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,608
    Likes Received:
    370
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
    Use double quotes. Example:
    Code:
    DOMAIN "\\hostname\share$"
    exclude "\\hostname\share$\...\*"
    include "\\hostname\share$\c\...\*"
    Also keep in mind that the directory structure under \\hostname\share$\a and \\hostname\share$\b will be backed up, but the files should not. Unless there's an overriding include.

    Check the complete include/exclude list by using: dsmc query inclexcl
     
    Arrow likes this.

Share This Page