Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to backup ID3 tags? (Read 2682 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to backup ID3 tags?

(Didn't have much luck googling)

Right now, if my music drive fails, I'd lose years of manually curated tags, including personal irrecoverable information like <play_count> or <first_played>, and I really don't want this to happen, so how'd I go if I wanted to backup the tags (with the option of importing them later)? Separate files, or a single database file, doesn't matter.

Re: How to backup ID3 tags?

Reply #1
What would you do with a backup of just the tags? Reapplying them would seem error-prone.

I'd say back up your entire music collection, plus Foobar's user profile data. The latter is one reason why I prefer installing in portable mode - makes it much easier to replicate the configuration, too.

Re: How to backup ID3 tags?

Reply #2
Opinions may differ. I have total music backup, plus 2-3 copies of only tags' backup. I do them with Mp3tag export (csv table, changing in comments, and such, line breaks to other symbol). In case of need it is not difiicult to copy tags back to files, with Mp3tag. Music copy needs terabytes, while tags' copy only megabytes.

Re: How to backup ID3 tags?

Reply #3
I'd say back up your entire music collection, plus Foobar's user profile data.

If the drive is about to fail, I think the OP does right in making priorities.

And if fb2k has the whole thing in a library, then tags could in principle be copied from fb2k without reading the files themselves.
I do not know if files would need to be read if one attempts to "populate tags without saving".
- disconnect the drive, so fb2k will not scan or touch your files.
- query the database for the number of files of each type.
- using the "automatically fill values" function, populate new tags %myfilename% and %myfilepath% with filename and path (or something like that) in order to be able to identify the files later.  Possibly also length in number of samples (that often helps to identify a file).
- in some "tags backup folder", create "dummy" one-sample MP3 files, FLAC files, etc., in exactly the same number as on your failing drive.  Probably you should name them 00001.mp3 00002.mp3 etc., to have a known sort key.
- select all your mp3s. Copy all tags. Paste them into the dummy mp3s. Save.
- repeat for the other file types.

Re: How to backup ID3 tags?

Reply #4
Yeah, I have more than a terabyte so copying it like that is not an option for me.
Thanks guys, I'm gonna look into mp3tag export first, assuming importing them back wouldn't be too hard.

edit: actually could you explain the process of importing because I'm not sure on how to do it. Mostly I wanna know - does it import by automatically matching songs to tags according to the name and so on, or do I have to manually select the same songs I exported data on the import? That is to say...

a. tag data with info of 5 songs > import on my library of 20 songs > automatically detect were those 5 songs are, match them, and ignore the rest
b. tag data with info of 5 songs > import on my library of 20 songs > have to select the 5 songs i exported the data of, otherwise all 20 get the tags of the 5

because if it's case b it'd be super hard to export the info of all my library, since it's changing all the time and getting new stuff added, so i couldn't just select all > export, and then select all > import, because by the time I import the data I probably would have at least a couple of new albums on the library which would screw up the whole order of the data import.


Re: How to backup ID3 tags?

Reply #6
Thanks guys, I'm gonna look into mp3tag export first

Dangerous! It will have to read all your files first, and that could kill the hard drive or file system.
:o  :o I use it 10 years with success, without any problems, for very difficult tasks - and I am very happy with it. By the way, about the hard drive's writing/reading: look at them in windows' Performance Monitor (Perfmon.exe). In these 10 years I use such programs, as Comodo Internet Security (firewall+antivirus+defender) with turned on logging (journaling), Raxco's PerfectDisk defragger with turned on Stealth Patrol + every 2 day defragging, foobar (it monitors the media folder, too), and windows' USN journal is runs allways, and so on, and so on. These tasks (foobar not so much) generate millions of reads/writes. Nonetheless, I never had problems with my hard diskes (both internal and external) in these 10 years.

Mp3 is so excellent program, as foobar, too. I recommend Mp3tag hard to all, who like music and correct tag system in the music files.

Re: How to backup ID3 tags?

Reply #7
...because if it's case b it'd be super hard to export the info of all my library, since it's changing all the time and getting new stuff added, so i couldn't just select all > export, and then select all > import, because by the time I import the data I probably would have at least a couple of new albums on the library which would screw up the whole order of the data import.

May be, I understood you not exactly? I recommend to you Mp3tag's export function for backing up tags. (It can serve much more needs, of course.) I usually do it monthly; and immediately copy the music files themselves to their backup location, using Total Commander's directory compare function, in case of mass changes in music files. But, fortunately, never (as I remember) need really to use the tags' backup for restoring data; and very rarely use restoring files back from backup. So, using tags' backup for restoring, in my opinion, is not a daily, but a very rare task, only for emergency needs.

But, anyway, export and import tags, using Mp3tag, is not a difficult story. Of course, as allways, first you must to learn, how to use it. Forum give you help, if needed. But later, it will serve you very well, decades of years.

First, to answer your question (sorry for my english): in short, "b" is the case. Files for overwriting must be exactly in that order (and quantity), as records in your backup file. (Mp3tag can not identify your files.) First in Mp3tag open those music files, what's tags you want to overwrite with data from backup. Second: sort the files. Third: select files for overwriting (mostly, I think, all). Fourth: overwrite them with backup data using "Text file - tag" function.

The best choice: sort the files before exporting and before importing, too, by path (%_path%), so it never will the case for problems. I (as most of us, I think) store my files in directory structure pop\performer\album\"track. title" and classical\composer\album\"track. title" (using "_various" subfolders too, in booth). So in case of needs, it will easy to sort files for restoring: they will exactly in that order, as the backup data. Of course, you must to check the number of files.

As I wrote earlier, before exporting, first replace (with functions) line breaks and tabulators in such tags, as comments, lyrics, and so on. And, learn the $loop() function's ability to sort.

Re: How to backup ID3 tags?

Reply #8
But this is not about Mp3Tag being a good piece of software or not (I think it is, I am a happy user myself).
It is about a failing hard drive. If you wish to backup all the tags, then your first shot is something that does not have to read the drive again - something which has all the tags in its library already.

Re: How to backup ID3 tags?

Reply #9
Oops! Understood you. If he does not use files' backup, as I, he must use tags' backup often. Yes, in this case foobar's Text tool plugin is better, for example. Foobar stores all tags in his library. But, anyway, he need Mp3tag for restoring.

Re: How to backup ID3 tags?

Reply #10
Right so the drive isn't failing, rather it's just a measure of backup that I wanna adopt for even when I buy a brand new drive... that said, since I first wrote the post, my drive has now had some problems and has a SMART "Caution" on Crystaldiskinfo so that's that, and it has made me more anxious than ever on getting this right.

The best choice: sort the files before exporting and before importing, too, by path (%_path%), so it never will the case for problems. I (as most of us, I think) store my files in directory structure pop\performer\album\"track. title" and classical\composer\album\"track. title" (using "_various" subfolders too, in booth). So in case of needs, it will easy to sort files for restoring: they will exactly in that order, as the backup data. Of course, you must to check the number of files.

As I wrote earlier, before exporting, first replace (with functions) line breaks and tabulators in such tags, as comments, lyrics, and so on. And, learn the $loop() function's ability to sort.

Okay first of all thanks for your help. Now see, this is what I mean: I do an export of the whole library as a .csv today, and tomorrow I download and introduce a new album into the collection, so now the order of the files doesn't match up, and the number of files doesn't match up, right? So what good is the .csv in that case? My library changes all the time, so the number of files and all of that will never match up perfectly unless I stop downloading music for the rest of my life. It'd be perfect if it could recognize automatically, for example - import .csv > search for "Thriller" by "Michael Jackson" > found! > import tags of "Thriller" by "Michael Jackson" > search for "Beat It" by "Michael Jackson" > not found! > don't import tags of "Beat It" by "Michael Jackson" > repeat until filling all library.

How do you mean about the line breaks and all of that? What's the purpose of that, and how do I do it?

Re: How to backup ID3 tags?

Reply #11
...It'd be perfect if it could recognize automatically, for example - import .csv > search for "Thriller" by "Michael Jackson" > found! > import tags of "Thriller" by "Michael Jackson" > search for "Beat It" by "Michael Jackson" > not found! > don't import tags of "Beat It" by "Michael Jackson" > repeat until filling all library.
I am afraid, you can not find such program.
...How do you mean about the line breaks and all of that? What's the purpose of that, and how do I do it?
Some tags, like COMMENT, usually can store line breaks, too. In tags' backup one line stores the data of one file. So, instead of saving %comment%, you must to save $replace(%comment%,$char(9),<TAB>,$char(13)$char(10),<CRLF>), or something similar. After restoring, you can replace them back, with a replace action. More detailed help you can find on Mp3tag's support page.

...Files for overwriting must be exactly in that order (and quantity), as records in your backup file. (Mp3tag can not identify your files.)...
But after, you can use Mp3tag's filter function to check, was the restoring process correct or not: filter items, where (for example) filename will not equal to "%track%. %title%".

Re: How to backup ID3 tags?

Reply #12
Right so the drive isn't failing
Ah! Goodie, there was an "if" I overlooked.

Maybe foo_tags could be an idea? It writes tags to external files. Then you can copy only those (preserving directory structure). 
Re-importing could be a bitch if you change folder naming, of course.  But if you can keep your fingers off folder names, then you could restore from backup by copying the backup'd tagfiles back (preserving directory structure).
https://hydrogenaud.io/index.php/topic,97164.0.html

Re: How to backup ID3 tags?

Reply #13
Wouldn't it be more sensible to restore ID tags by binding all metadate of each file to a unique key identifier. Masstagger can tag each file with a crc32 tag. I'm no programmer myself but I do think it's possible to program a script that loops through all keys and of those that are found fill in all metadata that corresponds to that key. Key's that aren't found (new files or absent files) are ignored. Metadata needs be stored in a external database somehow of course, sqlite could be a candidate for that.
If @marc2003 reads this, I'm sure he can confirm if jscript can do this or not.

Re: How to backup ID3 tags?

Reply #14
A 2TB drive costs the same as about 6 new CDs. Buy one and backup the full audio with tags, you bloody cheapskates!!  :))

Re: How to backup ID3 tags?

Reply #15
That's not how to do high-frequent periodic backups :-p
(me looking for a file system that recognizes audio files, puts metadata in separate file blocks, with nightly snapshots and full version control)

Re: How to backup ID3 tags?

Reply #16
Wouldn't it be more sensible to restore ID tags by binding all metadate of each file to a unique key identifier. Masstagger can tag each file with a crc32 tag.

* You want a checksum of audio content only. And AFAIK, mp3 can in practice differ by roundoff in the -150 dB range without anyone bothering - except here it would matter.
* Audio checksums are not unique. Silent files for tracks N to 98 with an unlisted track 99 ...

I can use the above on my (lossless) CD rips though. The ACCURATERIP ID and audio MD5 give sufficient precision. I think.