I'm trying to find a nice way to do backups of my Windows 7 Media Center machine. Ideally I'd like to take periodic snapshots of the entire hard disk, but leave some files out of the selection. For example, take an image of the whole hard disk, but leave out all of the TV recordings (not the end of the world if I lose those).

I've been using Clonezilla to successfully clone machines for a long time. It's smart enough to use ntfsclone to smartly clone hard disk without resorting to dd. However, it only images the entire hard disk or partition, and does not let me leave some files out.

I know this is possible because we've got a little USB->SATA drive dongle at work that came with some software that allows you to skip files (works great for migrating down to an SSD), but it requires the dongle and only works with laptop drives.

Any suggestions on software I should use? Open Source is preferred, but not necessary.

  • 1
    This is just an alternative solution to what you need, rather then answering your question directly. If you want to keep your TV shows "in the same place", but don't want to archive them, you might want to partition your hard drive. Then, you can make a symbolic link in a directory (instead of mounting the partition as a drive letter). – Breakthrough Aug 19 '11 at 21:02
  • I'm confused by your terminology and what you want. With a clone or mirror copy, directories and files don't exist. You are duplicating raw bytes. What those bytes represent is irrelevant. With a backup, location on the drive doesn't matter, so things like hidden markers in certain locations that are used for authenticating a software installation won't be reproduced. Files are more than blocks of data, they are also entries in tables. Are you looking for something that clones but leaves blank areas where selected files are located and deletes their entries from the file tables? – fixer1234 Oct 26 '14 at 15:56

Here is a way to do it using open source tools, e.g. using the Ubuntu live cd or live usb. You need the terminal and superuser access (sudo -i).

Suppose you want to clone the first partition on the first drive. This is known under linux as /dev/sda1.

First, create a full partition backup using ntfsclone:

ntfsclone -o yourfilename.img /dev/sda1

Yes, it will copy the full drive including unused space. You need sufficient temporary storage to facilitate this.

Now, you can actually mount this exact copy of the partition using a loopback mount point. E.g., to mount your backup at /mnt:

mount -o loop yourfilename.img /mnt

Now you can look at /mnt and delete stuff you don't need.

`cd /mnt

rm -rf "System Volume Information" 

rm pagefile.sys 

rm hiberfil.sys 

rm -rf "Users/myusername/MyLargeFolderIDon'tWantToKeep"`

When ready, unmount the /mnt folder:

cd the_directory_where_I_created_yourfilename.img
umount /mnt

Now, you can use ntfsclone again, but this time you use it on the cleaned up copy of the partition using the special disk format parameter. So your source is not the partition, but the previous backup file. It will only copy the blocks used in this case. Beware that, once you do this, the resulting image can't be mounted as the full disk image could be.

ntfsclone -s -o mysecondfilename.img yourfilename.img

Et voila, the second is an image only containing the data you want to be able to restore on /dev/sda1 in case of disaster.

You can now delete the full backup copy.

rm yourfilename.img

One way to do it is to use the Windows Image-based backup utility, and add the directories you wish to exclude to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\BackupRestore\FilesNotToSnapshot

Note that this will exclude it from "Restore previous versions" and other shadow-copy-based functionality


I myself have set up a scheduled task that runs wbadmin for this purpose.


Cloning is not backup'ing in my book. The advantage of a backup is that it does not copy everyting everytime but only whats different from the last save.

There's already a utility that does this on Windows 7. It is called ROBOCOPY. By default it is a program you need to start by the command prompt (windows_key+R, type 'cmd', press enter).

To use: robocopy SOURCE_FOLDER DESTINATION_FOLDER -parameters

You can use parameters to exclude some file type, directories, etc. Robocopy can copy over the network, on usb, etc. it doesnt make a difference. With the /MIR parameter, it 'MIRrors' your source in your destination folders and backup only what is newer.

  • Pridkett wants to backup everything but his TV show collection, and AFAIK, robocopy won't access everything on a running copy of Windows. If he only wanted to backup certain files, this would be a novel solution. I know you can exclude certain ones, but this won't allow you to image and restore the disk (sans your media files). – Breakthrough Aug 19 '11 at 19:27
  • 2
    Yup, I'm aware cloning isn't backup. I've got CrashPlan backing everything up (sans TV shows) to a local and a remote drobo along with CrashPlan Central. However, CrashPlan doesn't create a bootable image, it only backs up your files. I'd like to clone the drive to create a bootable image in case the drive dies. That way I'm not starting from scratch with installing the OS, drivers, and applications when I restore from backup. – Pridkett Aug 19 '11 at 20:21

A rinks true image will let you exclude folders, files, or by file mask. You can either using the backup feature (entire disk or specific partitions). You can also clone to another disk while excluding using the same methods mentioned before. The use case would be cloning to a smaller hard drive.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.