Previous Thread
Next Thread
Print Thread
Rate Thread
#212050 10/06/2001 1:34 AM
Joined: Apr 2001
Posts: 11
Power User
Power User
Offline
Joined: Apr 2001
Posts: 11
Has anyone managed to integrate a simple db backup routine. Ideally I'd like an admin function for one click backup and a similar one click to restore. The person who now administrates my forum is good at using w3t but I would not want to let him use phpMyAdmin for fear of making a mess of the db by inappropriate use of the massive functionality that phpMyAdmin provides.

Thanks


--<br>Roger
Sponsored Links
Shawnea #212051 10/07/2001 8:39 AM
Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
i would love that one.

the commands Scream suggests in the UPDATE files,
do not work here, at least ig I use the php-Interface in
the admin section.

rodrigo1 #212052 10/16/2001 1:25 PM
Joined: Sep 2001
Posts: 9
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 9
I did this for my copy of tForum. It isn't that hard. I used functions based off an earlier version (less complex) of phpmyadmin. I'm uncertain as to how the database is named for wwwthreads, but for my board, everything is preceded with a "t_" so I modified it so that only the tables starting with that prefix gets backed up by running a LIKE command to grab a table listing instead of all of the tables.
I won't post for now the entire code since it's geared for my forum, but basically all of the functions needed to be modified are in the phpmyadmin script named tbl_dump.php.
I also made 2 links on my admin panel. One that displays all of the table structure and data to the browser frame and the other gets saved to a file named forum_backup_10_16_2001.sql. Where the numbers are the date of backup. Like I said, I modified it quite a bit.
Once you look at the functions and follow what they do, you can easily change them to suit your needs.

Maze #212053 10/16/2001 5:24 PM
Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
Sorry, that was a little bit too difficult for me to understand :)
Thanks anyway,

rodrigo1 #212054 10/17/2001 11:33 AM
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
Carl,

here is how I have my backup setup... I telneted to my machine, created a .sh file (shell script) called dodump.sh. The contents are a series of commands to create/update 5 days worth of database backups for you... contents are:


#!/bin/sh

mv /home/mattyj/db_dumps/w3t.dump.4 /home/mattyj/db_dumps/w3t.dump.5
mv /home/mattyj/db_dumps/w3t.dump.3 /home/mattyj/db_dumps/w3t.dump.4
mv /home/mattyj/db_dumps/w3t.dump.2 /home/mattyj/db_dumps/w3t.dump.3
mv /home/mattyj/db_dumps/w3t.dump.1 /home/mattyj/db_dumps/w3t.dump.2
mv /home/mattyj/db_dumps/w3t.dump /home/mattyj/db_dumps/w3t.dump.1

/usr/local/bin/mysqldump --password=mydbPasswd myDBname > /home/mattyj/db_dumps/w3t.dump


obviously, you need to create the appropriate folders and make sure the paths are correct....
save your file, exit, and be sure to chmod 755 dodump.sh to make it executable...

Then, set up a crontab entry by typing crontab -e and entering something similar to: 15 2 * * * /home/mattyj/bin/dodump.sh

That's it!

you might want to run it a couple of times manually to make sure it is creating the files you need...

Does this help at all?

Matt


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)