INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Program to Compare Metadata?  (Read 3501 times)

Dawgincontrol

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 679
  • We have met the enemy and he is us.
Program to Compare Metadata?
« on: February 03, 2022, 09:02:15 am »

Is there a program that will compare metadata between my library and my back-up that anyone has found useful. 

I have programs that will back up, but want to only now change files where the metadata is different.  I don't believe Media Center has a tool that does this, nor actually does a back-up with parameters.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Not really on topic, but don't know where to ask here.
« Reply #1 on: February 03, 2022, 09:21:58 am »

I don't know....but there is a [Date Tagged] and [Date Modified] fields in MC so maybe those could be utilised to do a list and feed it to rsync.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Not really on topic, but don't know where to ask here.
« Reply #2 on: February 03, 2022, 11:00:15 am »

EDIT: I missed the purpose of the task - if you just want to automate backup of changed files/entries, the answers below are enough and better than this one.


There's no tool for that.
You can however get a JSON export of your backup and your current library and then use a JSON comparer. You'll need MC Server enabled for this:

- backup in case this goes wrong
- export current lib using a browser, save it to current.json
  http://YourMCServer:52199/MCWS/v1/Files/Search?Action=json
- create a new empty Library, switch to it
- restore the backup you wish to compare into this empty library
- export it using the same URL, save to backup.json
- switch back to your original library

You can use an online JSON compare tool like this one:
https://jsoncompare.org/

If the dumps are too large, you'll need to find another tool that can do it.

Edit: this will probably only work for smallish libraries due to the size of the export. For larger ones you should get the export with "wget url_above -O export.json" and find some tool that can compare huge json files. Or write your own.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Not really on topic, but don't know where to ask here.
« Reply #3 on: February 03, 2022, 11:24:41 am »

[Date Modified]=<1d seems to show files changed in a day so if you can get filenames for those using MCWS I'd guess it would be fairly east to write rsync script to backup those.

Of course cut would have to be little over day to be sure that everything is getting backed up with daily script
Logged

Dawgincontrol

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 679
  • We have met the enemy and he is us.
Re: Not really on topic, but don't know where to ask here.
« Reply #4 on: February 03, 2022, 12:47:19 pm »

Appreciate the replies. 

I have 22,000 files in my library, so going online would be time consuming. 

Hoping for more of a solution from hard drive to external hard drive comparison.  Using rsync with a script may be a way to go.  Will look at that later. 

Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2677
Re: Not really on topic, but don't know where to ask here.
« Reply #5 on: February 03, 2022, 02:07:18 pm »

Any backup software that allows incremental (delta) backups will work. Watch your blocksizes for best performance. rsync disables delta checks for local files because it is slower to read the entire destination file than just overwriting it in most cases. To enable use "--no-W":

Code: [Select]
rsync --archive --no-W --delete-after source dest
I have 22,000 files in my library, so going online would be time consuming. 

zybex was referring to comparing changes in the MC database, which could be done with his approach using MCWS over localhost (fast) if that was what you were going for.
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 849
Re: Not really on topic, but don't know where to ask here.
« Reply #6 on: February 03, 2022, 04:30:23 pm »

Any backup software that allows incremental (delta) backups will work.
zybex was referring to comparing changes in the MC database, which could be done with his approach using MCWS over localhost (fast) if that was what you were going for.
There are also dedicated file compare programs to examine changes between your current files and backup copies.

My personal favorite, which I have found to be 100% reliable for decades, over roughly 10,000 compare sessions, is Beyond Compare https://www.scootersoftware.com/ (free 30 day trial).
There is a learning curve, but it has enormous flexibility.  For example very fast time stamp &  file size comparisons v.s. slower binary compares.  You can also examine line-by-line differences.  Typically differences only show up in the header sections of my flac files, while the music itself is confirmed to be undisturbed.  BC is my go-to solution for manually maintaining backups of my music folder, documents folder, pictures, etc.  Great for moving files between local directories, external drives, and networked computers.
Logged

macdonjh

  • Citizen of the Universe
  • *****
  • Posts: 538
Re: Not really on topic, but don't know where to ask here.
« Reply #7 on: February 03, 2022, 08:15:17 pm »

Thanks for this.  My NAS software is supposed to only "re-back-up" changed files, but there's no way to compare the contents of my NAS with what's on my back-up drives using that software.  I guess I'll have to check into Beyond Compare.

For me, also, my media files don't change that much (except for what I add  :) ).  But my meta-data changes pretty frequently as I change tagging and as MC keeps track of what I play and what I sync to my hand-helds.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14497
  • I won! I won!
Re: Not really on topic, but don't know where to ask here.
« Reply #8 on: February 03, 2022, 08:22:42 pm »

FWIW, I use "FreeFileSync" to compare and backup my media files from one PC to another.  The thing I like about it is you can manually run it and preview the proposed copies/deletes before you commit them (add a verification step in case you have inadvertently deleted items etc).  I separately incrementally backup (Win Server) all my PC's C: Drives (no media) which the library is on.
Logged
JRiver CEO Elect

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3125
Re: Not really on topic, but don't know where to ask here.
« Reply #9 on: February 04, 2022, 12:18:49 pm »

FWIW, I use "FreeFileSync" to compare and backup my media files from one PC to another. 

Also known as SyncBack Free I believe. That is what I use for this task.
Logged

Dawgincontrol

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 679
  • We have met the enemy and he is us.
Re: Not really on topic, but don't know where to ask here.
« Reply #10 on: February 05, 2022, 02:26:55 pm »

Free File Sync appears to be the most simple to quickly do what I am looking for.  Wish there were more parameters, but it is quick to compare and save changes.  Sending the developer a few bucks.

Thanks for the help everyone.
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 439
  • MC33.0.30 x64bit
Re: Program to Compare Metadata?
« Reply #11 on: February 06, 2022, 05:39:40 am »

Also known as SyncBack Free I believe. That is what I use for this task.

Me too. Have done for many years. It works well.✔
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.
Pages: [1]   Go Up