Previous Thread
Next Thread
Print Thread
Hop To
#43015 11/09/2004 11:34 AM
Joined: Jul 2004
Posts: 17
M
stranger
stranger
M Offline
Joined: Jul 2004
Posts: 17
I guess this is a stupid question, but hey.....

If I download a copy of the database from a server as a backup, and later upload it, the board will look identical to as it was when I did the download, won't it ?

I ask because I'm about to purge some threads, and want to be able to get at the "purged" files again at a later date.

Thanks for your help. And not laughing at me.

#43016 11/09/2004 2:39 PM
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
Depending upon how you have made your backup and how you restore it you will probably overwrite ithe current database with your retore, putting it back to that snapshot in time, losing anyting that changed since the backupwas made.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
#43017 11/10/2004 5:01 AM
Joined: Jul 2004
Posts: 17
M
stranger
stranger
M Offline
Joined: Jul 2004
Posts: 17
Thanks David, that's what I figured.

Following the purge, I figured if I wanted to get anything back I could

1) Close the board
2) Download the current database
3) Upload the old database
4) Print / save any threads I wanted to see
5) Uploade the "current" database again
6) Open the board again.

#43018 11/11/2004 11:54 AM
Joined: Feb 2004
Posts: 86
K
journeyman
journeyman
K Offline
Joined: Feb 2004
Posts: 86
that sounds like a feasible plan. i would just double-check with your host to make sure that they allow you to restore as often as you want... i can't see why they'd have any limitations on it, but better safe than sorry...


Kate Thaete
Groupee Guide: Scriptkeeper
Groupee, Inc.
#43019 11/11/2004 5:21 PM
Joined: Jul 2004
Posts: 17
M
stranger
stranger
M Offline
Joined: Jul 2004
Posts: 17
Thanks Kate. I'm actually hosted by Infopop ..... <img src="https://www.ubbcentral.com/boards/images/graemlins/laugh.gif" alt="" />

It's not something I plan on doing regularly, it's just every now and then someone requests a thread from way back when. I have been saving them to disk individually, or by using something like HTTrack, but that tends to eat disk space.

#43020 11/20/2004 3:39 AM
Joined: Jul 2004
Posts: 17
M
stranger
stranger
M Offline
Joined: Jul 2004
Posts: 17
Ahem.....

It seems I deleted a thread by mistake. I've still got it in the backed up database. Is there any way I can move it from one database to another ?

#43021 11/21/2004 9:50 AM
Joined: Nov 2004
Posts: 28
D
newbie
newbie
D Offline
Joined: Nov 2004
Posts: 28
You will have to query the database (the backup) and see which records are related to that thread and import them in the live site.

It will be a quite tricky since you will have to find all the records (replies) related to this thread. The way to do it is as follows:

Restore the MySQL table w3t_Posts in a test/dummy database on your computer or somewhere else.

Use the Search function of phpMyAdmin to locate the record of the thread. Your search criteria might be the B_Board field which holds the Board that the thread was in and then you can also filter by B_Subject. You must find the thread that has B_Parent = 0 since this is your starting thread. Write down its B_Number because you will use that. Then a query like:

Code
SELECT * FROM w3t_Posts WHERE B_Number = 'Your number here' OR B_Main = 'Your Number here';

This will give you all the records of that thread. Now in order to get them all in your live database - the way I would go about it - is to delete all the records from the test w3t_Posts table and then export the remaining ones and import them in the live table.

Code
DELETE FROM w3t_Posts WHERE B_Number &lt;&gt; 'Your number here' OR B_Main &lt;&gt; 'Your Number here';

Check the record count. If the records remaining in the w3t_Posts table is the same as the ones that the SELECT query returned then you are in a good path.

Next, backup your live database's w3t_Posts table and keep it handy.

Export the w3t_Posts table from the test database and using phpMyAdmin start inserting the records in the live database. If you insert the first record (the one that has B_Parent = 0) the thread should appear (since that one is the first record). Then one by one you can start importing them and see the results.

If anything goes wrong you can restore the w3t_Posts table from the backup you got earlier (live server)

I hope this helps


Nikos

Web Desing/Programming: http://niden.net

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
0 members (), 744 guests, and 147 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)