Author Topic: mysqldump of RDJ DB  (Read 626 times)

Couin

  • New User

  • Offline
  • *
  • 2
    • Eurodance 90
mysqldump of RDJ DB
« on: May 25, 2020, 02:19:04 AM »
Hi,

I'm Couin from France and I'm admin the website of a friend's radio who have a RadioDJ PC at his home, permantly send live to the stream server .

For some features the website daily copy category, subcategory and songs tables from RDJ.
Every 5 seconds, the website reads some other infos like queuelist and some last track of history tables of RDJ, to update history and queuelist tables of the website.
So visitors solicit website DB instead of RDJ DB.
RDJ DB is solicited only 1 time each 5 seconds.

As well as my friend did a mistake (accidentaly moved a windows folder containing some musics, RDJ marqued all of the folder as enabled = 0 .
As well as somes songs was previoulsy disable volontary, I restored the last "songs" tables copy (of the Website) to the RDJ DB, because the recently backup he has is of one month.

I have a copy of his RDJ PC so in case of he lost his Internet connexion, I can send music instead of his RDJ PC.

I would automate the RDJ DB backup in the same synchronisation script.

As well I daily backup the Website DB, I tried to re-use the same php command :
Code: [Select]
system("mysqldump --opt -h$host -u$dbuser -p$dbpw $db | gzip > $path/_RDJ.sql.gz");where $host is the dyndns of his connection (or IP like 192.168.0.xxx for my RDJ PC , for tests, and of course, I have a copy of the website on a webserver on my LAN, so no problem on this side, my website see my RDJ).

The file I get with this command contains only :

Code: [Select]
-- MySQL dump 10.13  Distrib 5.5.22, for debian-linux-gnu (i686)
--
-- Host: 192.168.0.252    Database: radiodj161
-- ------------------------------------------------------
-- Server version 5.7.23-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

Is there specific syntax to run mysqldump with RDJ DB ?

RadioDJ 1.8.2.
MySQL Server 5.7

Thanks for ideas :)
Couin
Live vinyl mix every sunday 10:00PM (french timezone) on https://eurodance90.fr

ReiviloMix

  • New User

  • Offline
  • *
  • 10
Re: mysqldump of RDJ DB
« Reply #1 on: May 28, 2020, 01:08:22 AM »
Hooo !! Je crOa que je le connais...
 :D
Can you try :
1) Open Windows Command Prompt,
2) Go to your 'mySQL' folder (with mysqldump.exe),
3) and type :
# mysqldump -u root -pYourPassWord --databases radiodj161 > c://rdj-sauve.sql

You can use : "...RadioDJ v1.8.2\Setup\Database Setup.exe" for sql backup...

If you want the same result as "Database Setup.exe", add utf8 option :

# mysqldump -u root -pYourPassWord --databases radiodj161 --default-character-set=utf8 > c://rdj-sauve.sql

Is it PouET ?

aaronreed

  • New User

  • Offline
  • *
  • 1
Re: mysqldump of RDJ DB
« Reply #2 on: August 27, 2020, 03:47:49 AM »
Thanks for the information. It really helped me!