Excluding folders and files from a backup image

Discussion in 'backup, imaging & disk mgmt' started by Brian K, Nov 29, 2022.

  1. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    I've become interested in "excluding" again. I have a data partition in one computer which contains 290 GB of data. It contains two root folders which contain 200,000 files and 15,000 folders. 260 GB of data in these folders.
    These two folders are backed up on another computer and due to space constraints, I don't want to back them up again.
    The data partition was imaged and the two large folders were excluded from the image. Image size is 30 GB.

    Are others excluding folders/files from images? It's interesting.
     
  2. kC_

    kC_ Registered Member

    Joined:
    Apr 6, 2007
    Posts:
    580
    I personally only image my OS SSD (programs/small data/docs etc) and dont exclude
    Any "big data" is on a separate drive that doesn't get imaged... but I use robocopy to keep this mirrored to multiple locations / versions which is quicker/easier to manage

    as for VSS & exclusion it can cause issues.... but YMMV
    https://knowledgebase.macrium.com/display/KNOW80/How to exclude files from a Disk Image
    "Microsoft VSS includes the ability to exclude file patterns from snapshots. Although this can be useful in removing unnecessary files from images and clones the functionality isn't 100% reliable. Removing files is reliant on the VSS Optimization Writer and the if the files are not removed before the VSS timeout time has elapsed then snapshots may not exclude all the desired files. However, In general, unless you are removing many thousands of files then there shouldn't be a problem."
     
  3. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    Excluding Folders and Files is remarkably simple.

    Drive Snapshot used...

    Code:
    --exclude:\Storage\Keep,\Users


    Image for Windows used...

    Code:
    [k]\Users\ >
    [k]\Storage\Keep\ >
    You don't have to open Regedit with these apps.
     
  4. noway

    noway Registered Member

    Joined:
    Apr 24, 2005
    Posts:
    461
    I exclude one folder when using Macrium Reflect to image. It's a registry edit but how hard is that? I'd rather it was done using the GUI though.
     
  5. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    You can't do it with the GUI when using DS or IFW either. It's done from command lines.
     
  6. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,680
    Location:
    USA
    For Data Partitions, is there any advantage in creating a disk image with excluded folders over just using a file and folder backup option to backup the desired folders while excluding the undesired ones?
     
  7. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    Raza0007,

    If it was my main computer I'd use Robocopy. But it's my test computer so I'm experimenting.

    My preference, Robocopy for a Data partition.
     
  8. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,680
    Location:
    USA
    Since I know that you prefer Drive Snapshot and Image for Windows for backups. Do they not have a VSS enabled file and folder backup option?

    Robocopy is OK for backing up of data, but a VSS enabled point in time backup is better and safer as everything is backup up to an image file that can be encrypted, and you can continue working with the said data while the backup process is on going.

    I use Macrium's file and folder backup option to backup certain folders in my data partition. It has worked flawlessly. I do not even have to restore the entire folder, because if I need something I just mount the image file and copy the file or the folder I need from the backed up image.

    Since I have been doing this so this is why I asked if there was an advantage in using an image with excluded folders over the VSS enabled file and folder backup option available in most imaging utilities.
     
  9. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    I haven't checked lately but I thought Robocopy used VSS. It's fast. A daily synchronizing copy of 400 GB of data takes one minute.
    It produces a backup in native format. I prefer that.

    I've given up on DS with Excluded Folders and Files. A restore takes "years".

    I agree with how you are doing files and folders backups without imaging. I'm still looking for that "Exclusion" advantage.
     
  10. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,680
    Location:
    USA
    I have not used Robocopy, but I always thought of it as a data sync utility, where if you point it to a folder, it will copy everything in that folder to another folder and later make sure that everything in the two folders is in sync.

    I did some quick research on VSS enabled file and folder backup option, like the one that is available in Macrium. See this MS article https://learn.microsoft.com/en-us/windows/win32/vss/excluding-files-from-shadow-copies

    I believe Macrium's VSS based file and folder backup is doing exactly what you are doing with the command line options, i.e. excluding certain folders from an image backup. Macrium is just automating this process where it is just including certain folders, selected by the user, from the VSS volume snapshot shadow copy, while excluding the rest.

    So technically, a Macrium file and folder backup is a disk image with only certain folders included.

    Therefore in answer to your question in the first post. Yes, I am very much interested in excluding folders from images, but I use Macrium to automate this process for me :D
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.