1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

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,533
    Likes Received:
    354
    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,533
    Likes Received:
    354
    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