• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

[Solved] I think I screwed up with DB backup & restore - need help please!

Started by ignitenz, September 20, 2018, 10:06:11 AM

ignitenz

Hi all,

I've upgraded from Win7 to 10 - fresh install.

Firstly though I did a Windows backup, as well as the relevant Program Files from the Maria DB to my backup ext drive. I was not aware that I needed to backup the data files from within the database itself. Foolishly, I didn't write down the password for the original DB. I have the new one.

Now that I have a new working copy of RDJ2.0.0.7 and Maria DB 10.3 up and running, I still need to restore settings to the database...

Is there anyway this can be done by copying back files from the ext hard drive into the appropriate Program Files folder? If so, which files specifically?

Or am I doomed, having to re-import and cue all my audio files again? Please say I'm not!!!

Oh, if it helps, I was using RDJ2.0.0.1 and Maria DB 10.2 previously.

I await your answers with increasingly shortened finger nails!

Bryan.

ignitenz

#1
Quote from: stinga on September 20, 2018, 10:15:17 AM
Since you have a backup else where (don't loose it)...

Stop MariaDB and reinstall.
It maybe able to read the DB files and all will be good.

Willing to give it a shot!

So, I've uninstalled the DB and RDJ, reinstalled the original DB using the password I thought I'd used earlier, then copied the DB program files that I had backed up across to program files on the new PC. I then installed RDJ2.0.0.1, but couldn't validate the DB password! Grrr.


ignitenz

I've now uninstalled both RDJ and the DB, and will await further instructions... Thanks for the help so far!  :bash:

Calypso

Just to make something clear in the process:

You can have backups of your previous database in 2 ways: a database dump or the actual database files. The first is "human readable", the second isn't. (One exception: all databases put into one InnoDB datafile - this is not standard, so I don't expect your situation to be that way)

In both cases there is no password to access the database in those files. MySQL (and MariaDB) set the user/password to access the database in their own database; so if you reload a database dump of if you place the original databasefiles of the RadioDJ database into the appropriate directory, you still have to access that database with the password you've used when installing the new database software, or with a new user/password combination that you've created after installing the database software.

I don't have much experience with MySQL/MariaDB on Windows since I only use it on Linux machines, but how it works is largely the same.

Normally you would make a database backup by dumping it's contents to a file - if you didn't do that but you have a databasefile backup, extract the files of the RadioDJ database and put them into the new computer's directory where the databases reside should normally work. Access to that database is then, as explained, by the user/pass you've created when installing MySQL/MariaDB. Only place the databasefiles of RadioDJ in that directory - don't overwrite things from the MySQL/user databases.

ignitenz

Quote from: Calypso on September 20, 2018, 11:34:00 AM
Just to make something clear in the process:

You can have backups of your previous database in 2 ways: a database dump or the actual database files. The first is "human readable", the second isn't. (One exception: all databases put into one InnoDB datafile - this is not standard, so I don't expect your situation to be that way)

In both cases there is no password to access the database in those files. MySQL (and MariaDB) set the user/password to access the database in their own database; so if you reload a database dump of if you place the original databasefiles of the RadioDJ database into the appropriate directory, you still have to access that database with the password you've used when installing the new database software, or with a new user/password combination that you've created after installing the database software.

I don't have much experience with MySQL/MariaDB on Windows since I only use it on Linux machines, but how it works is largely the same.

Normally you would make a database backup by dumping it's contents to a file - if you didn't do that but you have a databasefile backup, extract the files of the RadioDJ database and put them into the new computer's directory where the databases reside should normally work. Access to that database is then, as explained, by the user/pass you've created when installing MySQL/MariaDB. Only place the databasefiles of RadioDJ in that directory - don't overwrite things from the MySQL/user databases.

Thanks Calypso,

So, to make sure I understand what your saying here, I should download and install the new DB msi package, and set it up with a new password, then install RDJ2.0.0.7. Then locate the appropriate files from the backed up 'Program Files' in the DB folder and copy them across to the appropriate folder (under Program Files) on the new PC?

stevewa

how comes nobody can find these links using the google???

read this to see if you can reset the password for the existing user of the old database from your backup
https://mariadb.com/kb/en/library/set-password/

it should lead you down the path to figure out how to gain access to that database so you don't lose all your data,

Calypso

Quote from: stevewa on September 20, 2018, 04:06:12 PM
how comes nobody can find these links using the google???

read this to see if you can reset the password for the existing user of the old database from your backup
https://mariadb.com/kb/en/library/set-password/

it should lead you down the path to figure out how to gain access to that database so you don't lose all your data,

I remember a few questions from you in the past that I know for sure would be Googlable too. And yes, it's sometimes annoying to see things coming by that have been answered already, but that's a fact of life on a forum.

You comments about setting the password are not an answer on his questions as far as I can see; he did a new installation, and only wanted to place the database files back - then, if done correctly, there is no password involved that comes from his old backup, so he knows the password.

Calypso

Quote from: ignitenz on September 20, 2018, 11:41:52 AM
So, to make sure I understand what your saying here, I should download and install the new DB msi package, and set it up with a new password, then install RDJ2.0.0.7. Then locate the appropriate files from the backed up 'Program Files' in the DB folder and copy them across to the appropriate folder (under Program Files) on the new PC?

I would install a new installation of MariaDB (preferred instead of MySQL), in that installation you have to give a new password etc. Then you stop the database service, go to the directory where the database files are installed, and place (in it's subdir) the database files of your RDJ database.

In most cases (at least on Linux systems) this works.

Calypso

Quote from: stinga on September 20, 2018, 06:20:36 PM
Worth a go, I wonder if there is a difference internally between MySQL and MariaDB.

MariaDB is a fork of MySQL, established by it's original developer after MySQL was acquired by Sun Microsystems and they wanted to be as compatible to MySQL as possible, but MySQL is still a bit "leading". Also you really can imagine at some moment in time they will go different paths. At this moment they are pretty much able to interchange between them.

Nice detail: My is the name of the oldest daughter of it's original developer, his younger daughter is called Maria.

ignitenz

All sorted now. Reinstalled RDJ2.0.0.1 and MariaDB10.2 as per my previous Win7 install. Then copied relevant config files over to new database. Reboot PC, and all is well.

Thank you all for your help, very much appreciated!

BTW... How does one actually do a backup dump of the database itself? I couldn't seem to find a way back into the database config GUI.
Sorted.

Cheers,
Bryan.