Create new database from back up

Good morning, first of all, I know I did something stupid :frowning:

I wanted to switch from a local db to a networked db, so I set that all up and than wanted to clone the local db into the networked db.
Now comes the stupid part, I cloned the empty networked db into the exiscting local db because I selected the wrong db at start up.

I did however made CSV export before everything so I thought that it would be easy to restore the local db by simply import the csv file again.
It is not :frowning: I can import the db but after synchronizing the music the tracks are not matching so Linkin Park is ABBA and Stratovarius are the Beegees for example. Also the map structure and cue points are not there.
I tried both ways around, make a new (local) db, synchronise music and than import the CSV, or first import the CSV and than synchronise the music.

Somewhere I am doing something wrong and read already a dozen of topics but can’t seem to find the answer.
Is it possible to create a new db from the CSV file or am I trying to do something impossible?

I am using a 7.4 professional version. Thank you in advance.

Gr Frank

Does anybody maybe has a clue for me?
Thank you in advance.

Gr Frank

CSV file is not suitable as a (full) backup. It’s only meant for sync with 3rd party music scheduling software.

When you import it into a new database, it will use the “ID” field as the “key” to link the CSV entries to the database items. But the files received different IDs during recreation of the database, so this will not work.

The solution is to edit the CSV file in Excel etc. and remove the ID column. Then the importer will use the “Filename” field instead, which might work for you.

https://wiki.mairlist.com/reference:mairlistdb_library_csv_import_export

Note that you will still not get a full restore. In particular, the folder structures and assignment will be lost.

For a full backup, always use a proper SQL dump (for SQL databases) or a copy of the .mldb file (for local databases).

Thank you Torben,

That will solve most work as que points etc etc is much more worthfull as the folder structure

I can proceed with this usefull tip, thank you!
Gr Frank

Good day,

For all who will unfortunately be in the same situation as me a small tutorial how to restore most of your database from a CSV export.
I will describe what I did so you will have some guide lines to get it done.
For sure there will be a hundred ways to approach, I also will make the assumption you have enough knowledge of Excel to adjust values in a smart and fast way, you do not want to manually adjust 6x 10.000 values. If not, look it up in the internet, there will be a lot of tutorials.

First I imported the CSV in Excel, not opened it, but imported so all data will be showed in columns.
Now I threw away the ID and External ID column. On importing your music, Mairlist will give all imported items an ID which will never correspond with the ones from your previous database.

So Filename will be the search and match criterium, it works like a charm I can tell.
However, you need to adjust a kind of things before you can import the CSV again in your new Database.

First I deleted all rows where no file name was present, ie your containers will have no file name. In my case if I not deleted the empty rows, those wehere the only ones to adjust and set to Dummy, all other items WITH file name remained untouched for some reason.

Now I adjusted all durations in the CSV file (opened in Excl). You need to do this as durations are in the format of “Seconds.Miliseconds” and in the CSV it has become one number. So I added columns, devided the values by 1000 in the new column, and then threw away the initial column. i did that for all colomns with a duration in it.

I also did this for the colomns with the play out levels. However, these levels will be set upon importing your items so you should be able as well to delete these columns from the CSV and leave hem untouched. I did not check that.

Now save your file again as CSV (Do it with a different name so you will always have your initial CSV export save!!). I was not done yet.

I opened the new saved CSV file in notepad and made some neccessary adjustments.
First I looked to the structure. The “column names” were devided by semicolons, and not the neccessary commas.
This was tricky, all the values altered (devided by 1000) where already plit with a comma. This will for sure be different if you will have other regional settings BUT BE AWARE OF IT!
So first I changed in Notepad all the commas to points, then changed all the semicolons to commas and saved the file again with a different name.

This will be your file to import into the Mairlist database.
I imported the items in small parts, so it would be easier to search if somewhere an erro should occur. This did not happen however.

Now all items are back in the database again, with correct tags, cue points, volumes and attributes used by me.
I rebuild my folder structure in the Database again and dragged and drooped all items again in the correct folders.
It is a bit of work but nothing compared to do it all again manually.

I hope this would help you if you for some reason will be stuks with an empty database like me and only have a CSV export.
Feel free to ask if you will have additional questions.

5 Likes