Skip to Content
It is currently December 15th, 2019, 3:15 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: April 4th, 2019, 3:21 am 
Offline
Experienced User
Experienced User

Joined: April 10th, 2009, 3:16 am
Posts: 401
Hi,
i've installed the new 2019.1 and i would like to restore db from another 2013.6 SAM version the mySql db has the same name
but when i try to restore sam saysRestore Failed. Row 1 doesn't contain data for all columns.
Could you tell me how can i do ??
regards, Stefano.


Top
 Profile  
Reply with quote  
PostPosted: April 4th, 2019, 4:49 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7889
Location: Aachen (Germany)
Looks like SAM added new fields to one of it's tables.
In that case old backups will no longer work when being imported directly.
You will need to compare the table structure and edit the backup files to account for the new field(s). (Easiest way to find out about the changes is to look that up in the upgrades/updates directory of SAM. SAM has a number of SQL files to iteratively apply changes to the DB structure)

_________________
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 4th, 2019, 5:20 am 
Offline
Experienced User
Experienced User

Joined: April 10th, 2009, 3:16 am
Posts: 401
Could you help me how to use these files ?? I'm not very able to work with mySql out of workbench..I can see many upgrades files with .sql extension..

Regards, Stefano.


Top
 Profile  
Reply with quote  
PostPosted: April 4th, 2019, 12:35 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7889
Location: Aachen (Germany)
I guess the only change is the event table's new enabled field.
Open your backup SQL file and look for the INSERT INTO event statement(s).

Check if the statement has either format A or B:
format A:
Code:
INSERT INTO event(ID, name, eventaction, data, extra) VALUES (1, 'Event 1', 'Queue', 'PAL Commands or similar', ''),(2, 'Event 2', 'Queue', 'PAL Commands or similar', '');


format B:
Code:
INSERT INTO event VALUES (1, 'Event 1', 'Queue', 'PAL Commands or similar', ''),(2, 'Event 2', 'Queue', 'PAL Commands or similar', '');


If your backup SQL follows format A, you need to change the list of fields in the first bracket by adding one more field called enabled. You also need to add the 6th column to each value set (set that to 1 for all value sets)

If your backup SQL follows format B, just change it to format A by listing the fields right after the table name and right before the VALUES keyword.

_________________
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 5th, 2019, 12:19 am 
Offline
Experienced User
Experienced User

Joined: April 10th, 2009, 3:16 am
Posts: 401
My backup files are all with .csv extension .. Where i can find a .sql file ??
Regards, Stefano.


Top
 Profile  
Reply with quote  
PostPosted: April 6th, 2019, 4:57 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7889
Location: Aachen (Germany)
Hmm, I'm not sure if the CSV type backups even include the column names or how to add these for the CSV backups.
I suggest you look for a CSV to SQL converter first and then manually restore the database from MySQL Workbench / HeidiSQL / mysql commandline (pick whatever you're familiar with)

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 13 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