phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Automatic Database saving

Goto page Previous  1, 2, 3
 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Fri Dec 26, 2008 4:19 pm 
Post subject: Re: Automatic Database saving

The "disallow" is simply a name of a table. It will become phpbb_disallow rather than just "disallow". The MOD I took that code from was the flags MOD (in use here) and to keep things in alphabetical order the table "flags" (aka phpbb_flags) was added after the disallow table.

The admin_db_utils code does both backups and restores. I remove it altogether from my boards. If you want to remove the ability to "restore" then you would have to alter rather than remove the code. I suspect it would not be too hard to do, but I have not researched it yet.

_________________
phpBBDoctor Blog
Back to top
~Cowboy~
Board Member



Joined: 08 Dec 2008

Posts: 297
Location: Chicago


flag
PostPosted: Fri Dec 26, 2008 4:57 pm 
Post subject: Re: Automatic Database saving

I guess I was a bit confused because of the name of the table. I see it in the $table = Array.

Thanks for that info icon_biggrin.gif

_________________
Image link
We are not refugees we are trail blazers. icon_wink.gif
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sat Dec 27, 2008 9:42 pm 
Post subject: Re: Automatic Database saving

It seems that I already have cron jobs on my cPanel, but do not really know how to use them. icon_redface.gif

Image link

What should I whrite in command to run? icon_rolleyes.gif

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Sun Dec 28, 2008 12:08 am 
Post subject: Re: Automatic Database saving

Please start by the two articles I linked previously as they discuss using mysqldump and cron. If you have a specific question we can take it from there. icon_smile.gif
_________________
phpBBDoctor Blog
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sun Dec 28, 2008 12:05 pm 
Post subject: Re: Automatic Database saving

Something like this I should put in command to run?
Code:
mysqldump -h localhost -u USERNAME --opt $dbname > $dbpath/backup.sql 2>>$dbpath/backup_errors.out
# create new backup filename
filename="$dbpath/$dbname.sql.gz"
# zip, and copy the output
gzip $output_file
mv $output_file.gz $filename

If I put this (replacing "USERNAME" with the FTP username, of course) should work well? icon_smile.gif

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
~Cowboy~
Board Member



Joined: 08 Dec 2008

Posts: 297
Location: Chicago


flag
PostPosted: Sun Dec 28, 2008 4:17 pm 
Post subject: Re: Automatic Database saving

I found this:
http://www.silisoftware.com/scripts/?scriptname=backupDB

It may be of interest.

_________________
Image link
We are not refugees we are trail blazers. icon_wink.gif
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Mon Jan 19, 2009 2:55 pm 
Post subject: Re: Automatic Database saving

I also only can recommend mysqldumper.
I read that you look for something else, but it is really worth looking into mysqldumper in combination with cron and an external FTP-server.
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Mon Jan 19, 2009 9:29 pm 
Post subject: Re: Automatic Database saving

Does anyone has a easy tutorial, I do not know how to use them. icon_redface.gif
_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Jan 20, 2009 7:38 am 
Post subject: Re: Automatic Database saving

Upload it to an own folder.
Browse that folder and follow the instructions (an English version is enclosed) for the setup. Nothing will be installed or written to a DB, only a config-file will be created.

When done with that use the mysqldumper interface to protect the folder with htaccess.
There is a utility for that included.

After that I can give you more instructions.
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Fri Feb 06, 2009 2:16 pm 
Post subject: Re: Automatic Database saving

That is very hard, I abbandoned the idea of even try. icon_smile.gif

Instead, I've found something that, if it works, it's gold!

Code:
## MOD Title: Automatic Database Backup
## MOD Author: kkroo < princeomz2004@hotmail.com > (Omar Ramadan) phpbb-login.sourceforge.net
## MOD Description: Backup up your database at the time you define, like a cronjob, but the great thing about it is your server doesn't need to support cron jobs. The script will do a complete backup of your phpBB table, then it will gzip it, put it in a directory named backups, and email a copy to you or store it in a FTP server.
## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: 5 minutes
## Files To Edit: common.php
##               includes/constants.php
##                templates/subSilver/overall_footer.tpl
##                templates/subSilver/simple_footer.tpl
##
## Included Files:


And here is the MOD.

What do you think? icon_biggrin.gif

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Fri Feb 06, 2009 4:23 pm 
Post subject: Re: Automatic Database saving

Sylver Cheetah 53 wrote:
That is very hard, I abbandoned the idea of even try. icon_smile.gif

icon_eek.gif
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Fri Feb 06, 2009 5:14 pm 
Post subject: Re: Automatic Database saving

From looking at the list of files included, I don't think this would be a good idea. If they're adding a trigger (event) to the footer, then your board would only get backed up when someone is actually visiting the board. It would work the same way pruning works; if no moderator visits the board, pruning never takes place. These are just assumptions as I have not downloaded or reviewed the code.

In my opinion, the best answer is to do the job right, with a cron job and shell script. If you can't do that, many hosts offer a backup service that you can subscribe to.

_________________
phpBBDoctor Blog
Back to top
Stan001
Board Member



Joined: 03 Feb 2009

Posts: 3



PostPosted: Fri Feb 06, 2009 8:55 pm 
Post subject: Re: Automatic Database saving

Sylver Cheetah 53 wrote:
That is very hard, I abbandoned the idea of even try. icon_smile.gif

Instead, I've found something that, if it works, it's gold!

Code:
## MOD Title: Automatic Database Backup
## MOD Author: kkroo < princeomz2004@hotmail.com > (Omar Ramadan) phpbb-login.sourceforge.net
## MOD Description: Backup up your database at the time you define, like a cronjob, but the great thing about it is your server doesn't need to support cron jobs. The script will do a complete backup of your phpBB table, then it will gzip it, put it in a directory named backups, and email a copy to you or store it in a FTP server.
## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: 5 minutes
## Files To Edit: common.php
##               includes/constants.php
##                templates/subSilver/overall_footer.tpl
##                templates/subSilver/simple_footer.tpl
##
## Included Files:


And here is the MOD.

What do you think? icon_biggrin.gif


I have tryed that mod and went to the place that has it and no answers. It just kept backing up my database over and over. No matter what I set it at it would make 100's of backups in a day. Still have not figured out why.
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Fri Feb 06, 2009 8:58 pm 
Post subject: Re: Automatic Database saving

Stan001 wrote:

No matter what I set it at it would make 100's of backups in a day. Still have not figured out why.

Well you know what they say! Better safe than sorry. icon_razz.gif

Code:

/usr/local/mysql/bin/mysqldump -u root --all-databases > /db_backup.sql

Is what I use, though it's probably better to put each database into its own file. But since this is the one I use for at home backup, (notice how I have a root user with no password) it's not such a big deal.

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL Mac 512K Blog Mac GUI
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 3 of 3 All times are GMT
Goto page Previous  1, 2, 3
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0302 seconds using 15 queries. (SQL 0.0027 Parse 0.0010 Other 0.0265)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo