View previous topic :: View next topic |
Author |
Message |
Kosmous
Joined: 10 Jan 2005 Posts: 44
|
Posted: Sun Apr 10, 2005 18:46 Post subject: Exporting Blob data into files |
|
|
Is there a easy way (without using anything except nwnx and mysql) to export blob data into a file? I was thinking of storing the character data into the db and exporting it as a .bic as a backup and to perhaps move it around multiple servervaults.
Im certain the .bic file thats exported from mysql is completely legal and can be used by players if placed in the proper directory (tried already). But what i used was mysqlcc's save function. Is there a command in SQL to export the blob file in the same way? Im suprised if there isnt since u can use LOAD INFILE to do the exact opposite. |
|
Back to top |
|
|
orth
Joined: 10 Apr 2005 Posts: 12
|
Posted: Mon Apr 11, 2005 2:26 Post subject: |
|
|
I'm thinking you would want the "INTO DUMPFILE" option.
SELECT bic_blob_column INTO DUMPFILE '/path/to/where/you/want/it/saved'
FROM table
Might want to google for more on MySQL INTO DUMPFILE, I didn't test this, but it seems to be the appropriate function. |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Mon Apr 11, 2005 4:06 Post subject: |
|
|
Orth is correct. The only downside is that INTO DUMPFILE has no recourse to overwrite files only create them. You will have to find a non mysql method to delete a file if you plan on overwriting one already in existence. |
|
Back to top |
|
|
Kosmous
Joined: 10 Jan 2005 Posts: 44
|
Posted: Mon Apr 11, 2005 6:53 Post subject: |
|
|
thanks a bunch, i think someone here already made a plugin that would move/delete bic files from player folders. If i combine the two, i can easily manage the player characters better Thanks again. |
|
Back to top |
|
|
teleri
Joined: 28 Jan 2005 Posts: 21
|
Posted: Tue Apr 12, 2005 0:56 Post subject: |
|
|
Would be intereted in your solution when its done (: sounds promising. |
|
Back to top |
|
|
Kosmous
Joined: 10 Jan 2005 Posts: 44
|
Posted: Wed Apr 13, 2005 5:17 Post subject: |
|
|
you'll need this:
Character Delete Plugin
http://www.nwnx.org/phpBB2/viewtopic.php?t=79
And by using the select statement above you can export the bic into the proper directory.
Since we have SCORCO, adding the character bic into the database is pretty straightforward. |
|
Back to top |
|
|
|