Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4

Author Topic: [MOD] Simple MySQL Backup v0.1 (no system calls)  (Read 20147 times)

jackp

  • Newbie
  • *
  • Karma: 2
  • Posts: 32
  • But you said "Stick it there!!"
    • Tim Chard - myEmote
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #30 on: March 26, 2008, 04:55:27 AM »

Thanks bramsyuur

Needed this one about ten minutes ago. BUGGER!!     NEWBIES - BACKUP YOUR DB!!!

using sNewsMU 1.6.3 there were a few (Cosmetic) differences in mod placement,  most notable was

Step 5

Place the Step 5 Mod after the last }} just above // SETTINGS FORM
function settings() then it will work. Placed anywhere else and the Backup Panel doesn't show.

Jackp
Logged

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #31 on: July 03, 2008, 07:43:53 PM »

I trying this mod, it seems to work perfectly.

About security access of the database backup folder, I'm wondering if a simple index.html file with a http redirect to the home page
and absolutely no content at all on it would be a good protection ?
If somebody find the database folder and try to access in it it will go on the home page !

What do you think ?
Stephane
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #32 on: July 03, 2008, 08:00:00 PM »

You might try that. Any index.htm file in a folder will be automatically delivered by the server if the folder name itself is added to the root URL. If empty, a blank page will display. I've not tried a redirect script there but I assume it would work.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #33 on: July 04, 2008, 11:44:42 AM »

With a simple empty index.htm file in this folder I have a blank page, normal.

With a htm redirect (with no text at all) I go on the home page. Like if the database folder doesn't exist  :P
But I'm not sure if that solution is a great security ??

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<meta http-equiv="refresh" content="0; url=http://localhost:8888/snews16/" />
</head>
<body>
<p><a href="http://localhost:8888/snews16/"></a></p>
</body>
</html>
« Last Edit: July 04, 2008, 11:46:41 AM by stephane »
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #34 on: July 04, 2008, 12:10:02 PM »

It's not great as it's based on obscurity. With index added it depends on backup file names not being guessable. If You enter proper url to that directory and file name then it's content will be revealed. So, either make them hard to guess or add .htaccess rules that'd restrict access from web.
Logged

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #35 on: July 07, 2008, 11:50:30 PM »

If I put in top on the sNews htaccess file this sentence : Options -Indexes

We can't access anymore to any folder or subfolders. And it's still possible to have the list of database files save in the admin area.
What do you think of this solution ? Looks fine ?
Logged

Joost

  • Guest
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #36 on: July 08, 2008, 02:35:33 AM »

If I put in top on the sNews htaccess file this sentence : Options -Indexes

We can't access anymore to any folder or subfolders. And it's still possible to have the list of database files save in the admin area.
What do you think of this solution ? Looks fine ?

NO!, Options -Indexes means that Apache doesn't generate an index for the browser (example). Switching that off, does not mean, it is inaccessible (just harder to find).
The database dump, includes your (encrypted) passwords, so preferably, you want the file created in a nonpublic folder, below the siteroot and make it non=worldreadable (chmod to 0644 or something else compliant to the server configuration).
Logged

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #37 on: July 08, 2008, 11:15:21 AM »

Ok ok.
But if the folder for database save is not in 777 we can't make the backup with this Mod !

Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #38 on: July 08, 2008, 04:01:08 PM »

Ok ok.
But if the folder for database save is not in 777 we can't make the backup with this Mod !

This is true. However... what I do is give the folder a unique name that is not easy for anyone else to guess. I use this mod on several sites (mine and clients) and I always download the backups to my computer after creating them... and delete them from the folder on the domain server... so there are none there for anyone to find. This eliminates the problem altogether... for me.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #39 on: July 08, 2008, 05:18:03 PM »

Yes you right, probably the best solution.
Logged

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #40 on: June 16, 2009, 01:45:26 PM »

Hi,
I'm try to use this MOD with Snews 17. Seem to work fine  :)
I change a little bit for 17 but I can't find where the Title name (top of browser)) goes.

ex: In admin area  > Settings We got a title name like :  Settings - Name site

In Backups admin area I got only the Name site like this :  - site name
Instead of Backups - site name

I change little thing for snews 17:
Code: [Select]
$l['cat_listSEF'] =  'archive,contact,sitemap,login,administration,admin_category,admin_article,article_new,extra_new,page_new,snews_categories,snews_articles,extra_contents,snews_pages,snews_settings,snews_files,logout,groupings,admin_groupings,dbbackup';

Next in function Center I put the DBBackup just under case 'snews_file'
Code: [Select]
case 'snews_files':
files(); return; break;
//MOD START: DBBackup by bramsyuur
case 'dbbackup': dbbackup(); return; break;
//MOD END

Then in Admin area
Code: [Select]
echo '<p><a href="snews_settings/">'.l('settings').'</a></p><p><a href="snews_files/">'.l('files').'</a></p><p><a href="dbbackup/">'.l('t_dbbackup').'</a></p></fieldset></div>';

I didn't change after.
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #41 on: February 17, 2010, 02:23:08 PM »

Au secours !!!
Hello boys
I sware I didn't touch anything to my old 1.6 sNews Core.  ;)
It has worked for months and years and now this is the message I got when trying to backup:
Quote
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in .../../myspace/snooze2MT.php on line on line 2638
What's happening?
Is that a server error, a DB error, a Sven error?
Tell me please I feel really bad. :-[

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #42 on: February 17, 2010, 03:18:00 PM »

Au secours !!!
Hello boys
I sware I didn't touch anything to my old 1.6 sNews Core.  ;)
It has worked for months and years and now this is the message I got when trying to backup:
Quote
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in .../../myspace/snooze2MT.php on line on line 2638
What's happening?
Is that a server error, a DB error, a Sven error?
Tell me please I feel really bad. :-[

This is caused by a PHP Max. Size limiter set to 8 MB on your host's server.

A Search on Google for Fatal error: Allowed memory size of 8388608 bytes will return a whole bunch of references to this issue... about 71,000 or so.

Check out any of the solutions offered on the first Google page. It seems your d-base backup file is over 8 MB in size (pretty big for a Snooze d-base) and you'll need to over-ride the server's PHP max size limit with one of the solutions offered.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Joost

  • Guest
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #43 on: February 17, 2010, 03:55:51 PM »


 It seems your d-base backup file is over 8 MB in size (pretty big for a Snooze d-base)

It is not file size that's over 8 MB. It's memory size that's over 8 MB.

Quote
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in .../../myspace/snooze2MT.php on line on line 2638
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: [MOD] Simple MySQL Backup v0.1 (no system calls)
« Reply #44 on: February 17, 2010, 04:05:44 PM »

Au secours !!!
Hello boys
I sware I didn't touch anything to my old 1.6 sNews Core.  ;)
It has worked for months and years and now this is the message I got when trying to backup:
Quote
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in .../../myspace/snooze2MT.php on line on line 2638
What's happening?
Is that a server error, a DB error, a Sven error?
Tell me please I feel really bad. :-[

This is caused by a PHP Max. Size limiter set to 8 MB on your host's server.

A Search on Google for Fatal error: Allowed memory size of 8388608 bytes will return a whole bunch of references to this issue... about 71,000 or so.

Check out any of the solutions offered on the first Google page. It seems your d-base backup file is over 8 MB in size (pretty big for a Snooze d-base) and you'll need to over-ride the server's PHP max size limit with one of the solutions offered.
Yeap it's more than 8Mb: I now use Piwik for my stats. And I'm now receiving a lot of visitors...
I've tried this php ini (memory_limit = 12M)  trick and tried the php line at the top of my index file: in both cases there were no more errors but no more backup. ;D

I've tried every solutions (even with an .htaccess which lead to a 500 error) in vain.
As my provider is 1and1 I guess there is a different solution to try.
Pages: 1 2 [3] 4