[TODO] Database backup: improvements?

Support for IntegraMOD 140

Moderator: Integra Moderator

[TODO] Database backup: improvements?

PostAuthor: gruslo » Sun Dec 10, 2006 8:26 am

I did a forum search, but didn't find anything... So, how can I transform the time for database backup and set it to be done weekly and not daily? My database is not big (25MB), but beeing done daily, it is space consuming, so I have to enter the ftp once a week, delete all backups and keep only one...
Last edited by gruslo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

gruslo
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 24, 2006 4:44 am
Cash on hand: 0.00

PostAuthor: ZacFields » Sun Dec 10, 2006 9:39 am

haha. before I started pruning and before I archived, my database backup was 266MB.

Umm.... I have a feeling this would not be difficult. I would assume there's a setting somewhere in the code that is most likely in seconds or minutes that you could simply change from the equivilant of 24 hours to the equivilant of 168 hours which would be a week.

I will take a look for this... but hopefully somebody who knows code a lot better than I do can step in here.

Zac
Last edited by ZacFields on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

ZacFields
Sr Integra Member
Sr Integra Member
 
Posts: 426
Likes: 0 post
Liked in: 0 post
Joined: Wed May 24, 2006 10:14 pm
Cash on hand: 0.00

PostAuthor: ZacFields » Sun Dec 10, 2006 9:45 am

Nevermind my previous post. I have looked at the code and from what I can tell the phpbb security is completely set up solely for daily backups. So if im looking at this code correctly it would take a little more of a modification than just changing one piece of code. That goes beyond my knowlege I apologize.

Zac
Last edited by ZacFields on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

ZacFields
Sr Integra Member
Sr Integra Member
 
Posts: 426
Likes: 0 post
Liked in: 0 post
Joined: Wed May 24, 2006 10:14 pm
Cash on hand: 0.00

PostAuthor: gruslo » Mon Dec 11, 2006 1:15 pm

I thought it would be easier... <img> Anyway, thanks for trying!
Last edited by gruslo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

gruslo
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 24, 2006 4:44 am
Cash on hand: 0.00

Re: Database backup: how to set on weekly?

PostAuthor: evolver » Tue Dec 12, 2006 2:41 am

The daily backup-function can be found in the next file:
includes/phpbb_security.php

The function is named]function phpBBSecurity_DBBackup()[/color]

The next line means that it wil do a backup if the day of the last backup is not today
and if the time is not before the time set in the backupconfiguration for making backups.
Code: Select all
if ( ($last_backup != $today) && (date('H') >= $backup_time) )

So that's where you can play with it <img>
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Database backup: how to set on weekly?

PostAuthor: evolver » Tue Dec 12, 2006 3:47 am

I also think the whole backup-thing could be much improved.

Some ideas I have:
At setting for maximum backups to keep (auto-deleting everything before),
maybe even with an the option of an exeptional day each month to keep.
Or maybe even an option to keep the amount of backups limited to a certain amount of space automaticaly (by deleting the oldest ones till it fits).
Selectors to make multiple deletes easier (like with PM's) instead of deleting one by one.

Addition:
Maybe even a download option before deletion...
It's always safer to keep backups seperate from the server, anyway.
Even a warningmessage (after a certain amount of backups) to the admin could be usefull.
Last edited by evolver on Thu Dec 14, 2006 3:37 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Database backup: how to set on weekly?

PostAuthor: Whisky » Wed Dec 13, 2006 6:59 am

I agree on the maximum backups to keep, if I forgot to clean my FTP I've got 1Go of backups after 2 weeks <img>

Another thing I propose is to add option for only send a report PM to the admin if the backup failed.

This is annoying to receive this message every morning and at the end you are so used to delete it that you don't even pay attention to what the message says: backup succed or failed.
Last edited by Whisky on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
I am the Lizard King, I can do anything

Whisky
Sr Integra Member
Sr Integra Member
 
Posts: 256
Likes: 0 post
Liked in: 0 post
Joined: Thu May 18, 2006 1:28 am
Cash on hand: 0.00
Location: Brussels

Re: Database backup: how to set on weekly?

PostAuthor: evolver » Thu Dec 14, 2006 3:52 am

"Whisky";p="18377" wrote:Another thing I propose is to add option for only send a report PM to the admin if the backup failed.

This is annoying to receive this message every morning and at the end you are so used to delete it that you don't even pay attention to what the message says: backup succed or failed.

Warningmessages should be optional by checkboxes:
- After failed backups
- After successfull backups
- After certain amounts of backups
- After a certain amount of space they take...

The total amount of space (and backups) could be mentioned in these messages as well...that would be usefull too
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Database backup: how to set on weekly?

PostAuthor: Whisky » Thu Dec 14, 2006 7:50 am

ok now the question is, who take these developments in charge? <img>
Last edited by Whisky on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
I am the Lizard King, I can do anything

Whisky
Sr Integra Member
Sr Integra Member
 
Posts: 256
Likes: 0 post
Liked in: 0 post
Joined: Thu May 18, 2006 1:28 am
Cash on hand: 0.00
Location: Brussels

Re: Database backup: how to set on weekly?

PostAuthor: evolver » Thu Dec 14, 2006 9:47 am

You? :mrgreen:

Ok, I will take these notes for later and look into it when I have time.
Because, I'm afraid that we will better not concentrate on this one before the next release. :wink:

If we continue canceling the release for every new modification, there will never be a release.
I have too many things to do for the moment, and I can only do one thing at a time :oops:
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: gruslo » Thu Dec 14, 2006 3:01 pm

You are right, backup works fine. It's just an useful idea, not for the present release but for a future modification, that will keep our server space clean (and not full of useless backups) and also will stop this annoying daily PM...
Thanks for your interest! We understand the priority of the next release, so we have patience for the database mod! <img>
Last edited by gruslo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

gruslo
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 24, 2006 4:44 am
Cash on hand: 0.00

Re: [TODO]Database backup: improvements?

PostAuthor: evolver » Thu Dec 14, 2006 3:36 pm

OK, I changed the name of this topic to get back to it later. <img>

All ideas to improve the database backup ACP can be noted here...
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Database backup: how to set on weekly?

PostAuthor: obiku » Tue Dec 19, 2006 12:04 pm

[quote=""evolver";p="18324""]The daily backup-function can be found in the next file:
includes/phpbb_security.php

The function is named]function phpBBSecurity_DBBackup()[/color]

The next line means that it wil do a backup if the day of the last backup is not today
and if the time is not before the time set in the backupconfiguration for making backups.
Code: Select all
if ( ($last_backup != $today) && (date('H') >= $backup_time) )

So that's where you can play with it <s>= $backup_time) && (date('w') == 0) )[/code]the backup will only created on sunday.
0 = sunday
1 = monday
..
6 = saturday

This is a first step in the right way, the second step is to remove the hardcoded day of backup for an option in the ACP...
Last edited by obiku on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
http://www.familie-smit.nl
http://portfolio.familie-smit.nl

Do not tsunami my inbox... instead use the forums...
Hard work may not kill me, but why take a chance?

[hr]
User avatar
obiku
Dev Team
Dev Team
 
Posts: 218
Likes: 0 post
Liked in: 0 post
Joined: Tue May 02, 2006 10:22 am
Cash on hand: 0.00
Location: level 8


Return to IntegraMOD 140

Who is online

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot]

cron