Clone Database

Hi,

Does anyone know if there is a command line (or remote command) way of running the ‘Clone Database’? I’d like to do an automated export of the database and files from our main system for an ‘offline’ OB system .

Thanks,
Matt

It’s currently only available in the GUI.

So what does Clone Database do? Does it just clone the database file, or does it also do the file system?

Only copies the database, not the audio files.

For local DB to local DB, this feature is not very interesting, because you can just copy the .mldb file.

But the clone dialog is also able to clone a network (PostgreSQL/MSSQL) database to an .mldb file.

Gotcha. Just a thought in regards to voice tracking.

@Torben any change on this? Can we automate the database clone process? Would be handy to integrate it in an automatic robocopy-script that makes a periodic backup of the audio files.

Quite an old thread… Which version are you using now?

Yep, that was the reason I was hoping it would be implemented now :slight_smile: I’m using 6.3.

This is how it shold work from a script in mAirList 6.3:

begin
  CloneDatabase(
    IDBConnection(Database(0)), // Connection
    'sqlite', // TargetType
    '', // Host, empty for sqlite
    'C:\temp\scriptclone.mldb', // Database, or Filename for sqlite
    '', // User, empty for sqlite
    '', // Password, empty for sqlite
    false, // Include icons?
    true, // Include playlist?
    0, // day from which to include playlists, 0 = all
    false, // Include history?,
    0, // day from which to include history, 0 = all
    '', // new database ID, empty = use existing
    nil // progress indicator, always use nil in scripts
  );
end.

Save as dbclone.mls and run from a scheduled event.

3 Likes

@Torben many thanks!!! I will test it and let you know the outcome.

Hi @Torben,

Does not seem to work. However, I am using a local database. Does that make this different?

Thanks, B.

When you are using a local database anyway, just copy the .mldb file and you’re good.

1 Like

Yes and no, I would like to automate this. And when the MDB is in use, I assume it is not a good idea to copy a database file that is actively being used. Or isn’t it?

What’s easier to automate than copying a single file with Robocopy?

And you can just do it in the middle of the night when there is very little activity. It only takes a few seconds.

Sure! I can easily include this in the robocopy-script I currently have.
But I mean, the database file will not be locked while mAirList is playing? Because I will count on this backup to run every now and then. I don’t want to run into a situation that one day I need that backup and it is a corrupt file.

Using the .backup command in sqlite3.exe (included with mAirList) might be the solution here:

I haven’t used it myself, but it seems that this is what you are looking for.

1 Like

A post was split to a new topic: Automatic mAirList backup otion