Media Browser Community Tracker

It might be necessary to backup your existing local metadata or other related Media Browser folders. For example when you want to experiment or simply because you want a backup of the configuration and metadata.


Using Microsoft SyncToy

Microsoft has a free Synchronization / Backup tool with a simple interface to manage the so called folder pairs. You can set the source and target directories and the synchronization method.

After you've downloaded and installed the application you can launch it from the Start Menu (Start > All Programs > SyncToy)

You will be presented with the main screen on which we're going to create folder pairs.

In this tutorial we're going to use the following example setup:

  • Movies are stored in E:\Movies
  • Series are stored in E:\Series
  • MediaBrowser ProgramData is stored in C:\ProgramData\MediaBrowser
  • ImagesByName is stored in E:\MediaBrowser\ImagesByName
  • The target location is an external USB harddisk with driver letter G:.

The target location can be any location that is accessible from the machine. (e.g. another folder, another harddisk, external harddisk, network share)

We're going to start with the “Movies Metadata Backup”.

On the main window click the “Create new folder pair” button. In the new window select the source and target path. SyncToy identifies the source as the “Left folder” and the target as the “Right folder”.

On the second screen, choose “Echo” as the synchronization type. That will result in SyncToy updating the right folder with everything that’s in the left folder.

On the last screen, choose a name for the folder pair and click Finish. “Movies Metadata Backup” is appropriate in this case.

Q: But wait! isn’t this going to backup all my movies to the second location.
A: Yes it is, but we're going to include only metadata in the following steps.

Now that the folder pair is created, we're going to change the options for this folder pair. On the main SyncToy window, highlight the “Movies Metadata backup” folder pair on the left and then choose “change options”.

On the new window, in the “Files to include” input field we're going to specify what we want to include in the backup. Since we only want metadata for this folder, the only file types we want to include are “*.jpg;*.png;*.xml”. After you're done, click “Ok”.

if you want to include additional filetypes, you can include these of course.

Back on the main screen you can now either click “Preview” or “Run” to perform a backup. Using the preview you can see what SyncToy would actually do when pressing the run button, but without the actual copy process. This way you can review the settings.

Depending on the size of your collection the process can take quite some time and it may appear as if the program hangs. Just let it sit there for a while if this happens.

Now repeat the above for the “Series Metadata Backup” and any other folder locations from which you you want to backup the metadata.

Other Media Browser related folders

The ImagesByName and ProgramData folder are a little bit easier to configure. For these folders we simply want to backup everything. That means that you configure them the exact same way, except for the “Files to include” option. Just leave the default “*” value in the input field. (So basically skip the entire “change options” window)

After you've configured all your folder pairs and checked if everything is working as you want, you can then create a backup of all Media Browser related data using the “All Folder Pairs”.

Highlight the “All Folder Pairs” in the navigation pane on the left and review the source and target paths. Click “preview all” or “run all” to make a backup of all configured pairs at once.

After you've clicked the “preview all” or “run all” button, SyncToy will start looking for all changes in the source location and match it with what it has in the target location.

Remember that the first time you do this, it can take quite some time for all the metadata to backup. Especially if you have a very large collection.

All done! You now have a backup all metadata and related Media Browser files.


Using a Batch script

You can backup your non-video files like metadata and artwork using a batch script.

Steps

  1. Create a new text file and name it “backup-metadata.txt”.
  2. Open the newly created file in notepad
  3. Paste the code snippet below in notepad
  4. Change directories and/or exclusions accordingly and remove any that aren’t needed.
  5. Save the file
  6. Now rename the file to “backup-metadata.bat”
  7. Run the script

Notes:

  • Always use double quotes around your source and destination locations (if there is a space in the name and you don’t use quotes it won’t work, so use them just to be safe)
  • The script below shows examples of folder paths. you need to edit these to match your own folder structure
  • anything after the /XF switch will be excluded, so be sure to list all your video file types in there (eg. *.avi)

Script:

This script will export everything in your source folders in the exact same file structure to the destination folder, minus whatever file types you have in your exclusions.

@echo off
REM 
REM usage:
REM Robocopy "<source path>" "<destination path>" /E /XF [list of excluded file types separated by a space]
Robocopy "Z:\HD Movies" "O:\backup\xml\HD Movies" /E /XF *.mkv *.avi *.m2ts *.mp4 *.wmv *.wtv
Robocopy "X:\HD Movies 2" "O:\backup\xml\HD Movies 2" /E /XF *.mkv *.avi *.m2ts *.mp4 *.wmv *.wtv
Robocopy "M:\DVDs A-F" "O:\backup\xml\DVDs A-F" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.mpg *.m2ts *.mp4 *.wmv *.wtv
Robocopy "E:\DVDs G-Ma" "O:\backup\xml\DVDs G-Ma" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.mpg *.m2ts *.mp4 *.wmv *.wtv
Robocopy "P:\DVDs Me-T" "O:\backup\xml\DVDs Me-T" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.mpg *.m2ts *.mp4 *.wmv *.wtv
Robocopy "O:\DVDs new" "O:\backup\xml\DVDs new" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.mpg *.m2ts *.mp4 *.wmv *.wtv
Robocopy "O:\DVDs So-Z" "O:\backup\xml\DVDs So-Z" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.mpg *.m2ts *.mp4 *.wmv *.wtv
Robocopy "X:\DVDs Music" "O:\backup\xml\Music" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.mpg *.m2ts *.mp4 *.wmv *.wtv
Robocopy "O:\DVDs Sports" "O:\backup\xml\Sports" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.mpg *.m2ts *.mp4 *.wmv *.wtv
Robocopy Y:\TV "O:\backup\xml\TV" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.rm *.mpg *.m2ts *.mp4 *.asf *.wmv *.wtv
Robocopy N:\TV2 "O:\backup\xml\TV2" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.rm *.mpg *.m2ts *.mp4 *.asf *.wmv *.wtv
Robocopy V:\TV3 "O:\backup\xml\TV3" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.rm *.mpg *.m2ts *.mp4 *.asf *.wmv *.wtv
Robocopy "X:\TV archive" "O:\backup\xml\TV archive" /E /XF *.mkv *.avi *.vob *.ifo *.bup *.rm *.mpg *.m2ts *.mp4 *.asf *.wmv *.wtv
Robocopy X:\audio "O:\backup\xml\audio" /E /XF *.mpg *.m2ts *.mp4 *.asf *.wmv *.mp3 *.flac *.wma *.m4a *.wav
Robocopy "O:\backup\xml" "V:\backup\xml" /E /XF
pause

Thanks to DemonSeed because I'm pretty sure he is the one who told me how to do this way back when.

  • Will this work for subfolders in the folder structure, for ex box set folders , trilogys etc. – lappen 6 months ago
  • yes it will – tp546 6 months ago
  • Perhaps you could just provide us with a description of what we can back up — perhaps a directory listing of the results of this script would help – thanks. – deck 5 months ago
  • you can backup anything and everything – just list your exclusions as i have done and everything else will be backed up. – tp546 5 months ago
  • Right o – got it – thanks. – deck 5 months ago

Return to Knowledge Base