Skip to Content
It is currently December 11th, 2019, 7:52 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: April 16th, 2014, 11:50 pm 
Offline
Junior User
Junior User

Joined: March 26th, 2013, 12:47 am
Posts: 35
Location: Hungary
Hi!

What do I set incorrectly ?
No Syncron mysql between PC and Synology Nas mysq .

data:
Windows XP
Public fixed IP address
PC - Mysql 5.5
SAM Broadcaster v4.9.0
samPHPweb

dbconfig.xml.php
<Database>
<driver>MYSQL</ Driver >
<host>Xx.xxx.xxx.xxx</ Host >
<Port>3306< / Port >
<Database>samdb</ Database >
<username>radarok</ username>
<password>password</ Password >
</ Database >

Router - DIR- 600
Open ports 3306, 1221
PC's IP address - 192.168.0.101
Synology IP address - 192.168.0.100
DMZ eneble - 192.168.0.101
Mysql workbanch :
Connection SAMDB - radarok - Hosts : 192.168.0.100:3306
Connection SAMDB - localhost - radarok - Hosts : 192.168.0.100:3306
Server Instance - mysqld@192.168.0.100
Host: 192.168.0.100 Type Windows

The site is all right , everything works perfectly .
I can save database (Tools/Backup or Restore)
The problem is that the data does not go through the Synology NAS mysql database.
So if I stop the SAM and turn off the PC, the web Oops ...

If I reconfigure when I start the SAM, the connection (host: 192.168.0.100) all data goes to the Synology NAS mysql, but I can't save (Tools/Backup or Restore) - Backup failed

Please help me to find, what is the bad setting

thanks: radarok


Top
 Profile  
Reply with quote  
PostPosted: April 17th, 2014, 8:23 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7888
Location: Aachen (Germany)
radarok wrote:
If I reconfigure when I start the SAM, the connection (host: 192.168.0.100) all data goes to the Synology NAS mysql, but I can't save (Tools/Backup or Restore) - Backup failed

That is normal. SAM uses MySQL's internal export functions to perform it's backup functionality. That means SAM tells MySQL to export to a certain path. But when MySQL is not running on the same machine as the export target or if the path was a UNC path, that is impossible for MySQL on your Synology to handle.
You'll have to use stuff like Workbench to create your backups if MySQL is not on the same machine as SAM.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 17th, 2014, 9:08 am 
Offline
Junior User
Junior User

Joined: March 26th, 2013, 12:47 am
Posts: 35
Location: Hungary
Hi!

Thanks for your response!
As I understand it, I can not be set to normally being saved?
There is my list of 180,000+ songs and accompanying album images.
If I add new albums to the list, immediately prepare a backup as well.
If I can not normally save (Tools/Backup) then I can save the entire database of workbanch and I can get back too.

I'm afraid that if I format the hard drive (because I need to install new windows again) from the Synology NAS mysql, SAM can recover data in the playlist? (Tracks, Billboard, Foreign)

If I can get back, it's okay, I do not need to save the normal way (Tools/Backup)

That's it possible?


Top
 Profile  
Reply with quote  
PostPosted: April 17th, 2014, 10:34 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7888
Location: Aachen (Germany)
You don't need to have a backup in the format of SAM.
As long as there is a database in place and that database contains valid data, SAM will work.
I create my backups using a scheduled task:
Put this in a .bat file:
Code:
@ECHO OFF
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump" -u<user> -p<password> -h<host> samdb --result-file="%LOCALAPPDATA%\SpacialAudio\SAMBC\sqlbackup\backup.%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%.sql"

^^ Adjust the path to the mysqldump.exe on your computer and enter user password and hostname to the mysql server

And then run this command as an administrator:
Code:
schtasks /Create /SC WEEKLY /TN MySQLBackup /ST 22:00 /TR "c:\path\to\the\above\file.bat" /RL HIGHEST

^^ This would run a weekly backup task on 22:00 repeating each week on the weekday you created the task (this is run using the Windows Task Scheduler)

EDIT on 30.06.2018:
I added the /RL HIGHEST option to the task creation mechanism as I was told that some computers don't have access to the LOCALAPPDATA with a "limited" user account. That option should make the task run as an administrator/with admin privileges as well and get around any file permission limitations.
Not sure if the resulting file will then be accessible to "normal" users at all, so you might instead want to change the result-file location to somewhere in your user folder that is accessible to the user. (i.e.: C:\Users\<insert-username-here>\backup.%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%.sql)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 17th, 2014, 11:27 am 
Offline
Junior User
Junior User

Joined: March 26th, 2013, 12:47 am
Posts: 35
Location: Hungary
Hi!

Thanks for your help, it's great!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: MSN [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group