Previous Thread
Next Thread
Print Thread
Rate Thread
#238261 02/26/2003 11:51 PM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
I wasn't real sure where to post this as it really pertains to maintaining the forums, and I was really thinking this is something that threads should have but it wouldn't be actually intergrated into the forum software, instead an added cron event.

dodbbackup.php is responsible for backing up the data base(s), As I just went through and had to restore my users and posts databases from a backup I'd manually created last week I saw the light in needing a daily backup.

What I'd like to see, and I'm sure a lot of threads admins wouldn't mind having, is a way to invoke dodbbackup.php nightly, have it create a directory under the /backups directory of your choice by date. Ie, /backups/022603, /backups/022703 etc. and still be reconized by threads.

As I see it now, I could create a cron event to call mysqldump and pass the parameters too it, but it would be nice to have it intergrated a bit with threads too!

As much as the next wiz bang mod is looked forward to, the mundane utility that saves your skin someday down the line REALLY is appreciated... Any help??

Any suggestions?


Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I haven't set this up yet.... but someone recently told me about http://www.phpmybackup.com/

It's a utility that can backup and even FTP the files to another server.

I do want to play with this some time... I just haven't had the chance.

Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Thanks Josh, I'll check that out.

I would think that since we've already got most of the work in treads alla dodbbackup.php and such, we'd need an external handler, or include some form of timer in threads and have threads do it.


Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Threads simply uses the system() function to run mysqldump. To do what you want, I think it's easier to just set up a cron table entry to run mysqldump explicitly. That's what I do, except that the cron table entry also runs the mysql commands to check all the tables. It's completely external to threads, so there's no maintenance overhead when doing version upgrades.

Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
I checked out the phpmybackup, and it did work somewhat as advertised, it really took up some overhead, and lasted a while on some of the larger data files.

My question to you would be what command set are you using mysqldump -???? and how are you handling archival issues? Are you just dumping on top of your backup, so in essence you're backed up one day at all times? I was hoping for something that I could backup the database, gz it as that days date and set it aside. then manually months down the road delete old backups as desired.


Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
My cron table entry runs a PHP script.

That script runs mysqldump with the following options: --quick --add-drop-table --add-locks --lock-tables

The --opt option, as suggested by the MySQL manual, includes all of the above options with the addition of --extended-insert (Use the new multiline INSERT syntax, for more compact and faster inserts statements.) The --extended-insert option was intentionally omitted here since it makes it more difficult to view or edit the dump file with a text editor, should that be desired.

I construct the backup file name by concatenating a timestamp to the database name, so that each backup is in a new file.


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)