Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ CMS (All) ⇒ Requests :: Archives ⇒ Database: Auto Backup functionality :: Archived


Database: Auto Backup functionality :: Archived
Requests for core changes must be submitted through the Projects Features section.
Go to page 1, 2  Next
This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page     Forum Index ⇒  Requests

Topic Archived View previous topic :: View next topic  
Author Message
FrontRunner
Nice poster
Nice poster

Offline Offline
Joined: Feb 27, 2005
Posts: 62
Location: Netherlands
PostPosted: Fri Sep 30, 2005 6:44 am
Post subject: Database: Auto Backup functionality

Was just wondering, as a request or idea, if the next version of CPG Nuke could have a Auto Backup functionality for the database. Currently my ISP doesnt do a auto backup of our database so i´m using 3rd party software to do that for me.

I think it would be great if you could select the auto-backup functionality (on/off) and that the backup file is saved in a seperate folder or ftp-ed to another fileserver or even emailed.

_________________


FrontRunner's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1
Back to top
View user's profile Visit poster's website
norbie
Silver Supporter
Silver Supporter

Offline Offline
Joined: Jun 29, 2004
Posts: 737
Location: Norbie's World
PostPosted: Fri Sep 30, 2005 7:29 am
Post subject: Re: Database: Auto Backup functionality

I second this as I can't get a cronjob to work for me.

My host says to use PHP instead of Perl, so integrated into the system would be great! Very Happy

_________________
Norbie

www.norbiesworld.co.uk

norbie's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / Apache Custom Version / 4.0.26-standard (client: 5.0.15) / 4.4.4 / 9.1.1
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
mc__
Debugger
Debugger

Offline Offline
Joined: Jul 12, 2005
Posts: 452
Location: QLD, Australia
PostPosted: Fri Sep 30, 2005 7:55 am
Post subject: Re: Database: Auto Backup functionality

I could code a raw dumping one easily, and it'd be tar'd then bz2'd so it'd take like no space at all. But df already has 'proper' db backup function so we should use that instead, and just stream its output into a local file, then exec() tar followed by bzip2 on the php-created text file.

However to make it do this when no ones visiting would be hard. I do not think that you can have a php script just invoke itself. It'd have to keep a last_updated record, and when it is next run if it is a certain time after that then it performs a backup. Maybe put a call to it in each of your theme header templates so someone just needs to visit the page to activate it.

Sounds do-able, but i haven't looked at it.

_________________


mc__'s server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux (Kernel: 2.4.21-27.0.2.ELsmp)/1.3.33 (Unix)/4.0.24-standard/4.3.11/9.0.5.0
Back to top
View user's profile Visit poster's website MSN Messenger
DJ Maze
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 5683
Location: http://tinyurl.com/5z8dmv
PostPosted: Fri Sep 30, 2005 11:17 am
Post subject: Re: Database: Auto Backup functionality

Perl and PHP are both not adviced for cronjobs because they will produce an overhead.
I already provided somewhere in these forums a shell script to use as cronjob. FYI maybe it's already in the FAQ or Wiki Shocked

Secondly the shell script could be easily converted to PHP if you realy need such bad thing.


DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
Back to top
View user's profile Visit poster's website Yahoo Messenger Photo Gallery
norbie
Silver Supporter
Silver Supporter

Offline Offline
Joined: Jun 29, 2004
Posts: 737
Location: Norbie's World
PostPosted: Fri Sep 30, 2005 1:59 pm
Post subject: Re: Database: Auto Backup functionality

Sorry, I think I meant Shell. I've tried the one from the a post of yours in the forum, the one in the Wiki, and the PHP script there, but none of them seem to work.

My host just said they recommend using PHP rather than Shell/Perl.

_________________
Norbie

www.norbiesworld.co.uk

norbie's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / Apache Custom Version / 4.0.26-standard (client: 5.0.15) / 4.4.4 / 9.1.1
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
Mystic
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Jun 25, 2004
Posts: 1312
Location: Spokane, WA USA
PostPosted: Fri Sep 30, 2005 2:04 pm
Post subject: Re: Database: Auto Backup functionality

norbie wrote:
My host just said they recommend using PHP rather than Shell/Perl.

Time to recommend a new host? Wink I use a script written by Tsykoduk that works great!

_________________
- |\/|ystic

Mystic's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.20-16/Apache/5.0.38/5.2.1/9.0.6.1
Back to top
View user's profile ICQ Number AIM Address Yahoo Messenger
norbie
Silver Supporter
Silver Supporter

Offline Offline
Joined: Jun 29, 2004
Posts: 737
Location: Norbie's World
PostPosted: Fri Sep 30, 2005 2:13 pm
Post subject: Re: Database: Auto Backup functionality

Nah, apart from that they're brilliant in what they offer.

I was told
Quote::
Perl/CGI scripts can be tricky to setup and we do always recommend using PHP scripts.

Check list for CGI scripts:
- Upload using ASCII
- Set permissions correctly (chmod), this seems to be correct
- Use the correct Perl path

I hope this may help,

I could take a look at that script though please?

_________________
Norbie

www.norbiesworld.co.uk

norbie's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / Apache Custom Version / 4.0.26-standard (client: 5.0.15) / 4.4.4 / 9.1.1
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
FrontRunner
Nice poster
Nice poster

Offline Offline
Joined: Feb 27, 2005
Posts: 62
Location: Netherlands
PostPosted: Fri Sep 30, 2005 2:31 pm
Post subject: Re: Database: Auto Backup functionality

Currently trying to use phpMyBackupPro 1.7.1. Installed and configured it today, so that it auto backups the database once every 24hours. Need to see if it works properly tho. If CPG Nuke could include that into the backup module, it would be great.

_________________


FrontRunner's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1
Back to top
View user's profile Visit poster's website
tsykoduk
Nice poster
Nice poster

Offline Offline
Joined: May 31, 2004
Posts: 103
Location: a Chair
PostPosted: Fri Sep 30, 2005 11:06 pm
Post subject: Re: Database: Auto Backup functionality

If you have shell access and cron access, you can crop together a quick script liek the following..

Code::
cd ~/backup
rm backup5.sql
mv backup4.sql backup5.sql
mv backup3.sql backup4.sql
mv backup2.sql backup3.sql
mv backup1.sql backup2.sql
mv backup.sql backup1.sql
mysqldump --all-databases >backup.sql

I have a backup folder off the root of my site, and the script lives there. Each day, it rotates 5 days worth of backups and then grabs a complete mysql backup of all of the DB's on my host.

Quick, painless and easy.

Tomorrow FTP'ing it to a remote host for even more backup goodness.

_________________
For a Good Time
For a Bad Time
For a Geeky Time


tsykoduk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS X 10.8.2.1/3.9/8.2/1.0alpha/Next Gen
Back to top
View user's profile Visit poster's website ICQ Number AIM Address MSN Messenger Yahoo Messenger
javafaq
Supporter
Supporter

Offline Offline
Joined: Feb 01, 2005
Posts: 33
Location: Sweden
PostPosted: Tue Oct 18, 2005 1:50 pm
Post subject: Re: Database: Auto Backup functionality

I use this script for more than two years:
sourceforge.net/projec...ysqlbackup

and never had a porblem. It makes incremental backup - daily, weekly, monthly and reports you by email.

Do not invent the wheel - improve it!


javafaq's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
CentOS3.3/2.x/4.1.x/4.3.x/9.1
Back to top
View user's profile Visit poster's website
tour93
Gold Supporter
Gold Supporter

Offline Offline
Joined: Apr 20, 2004
Posts: 526
Location: florida
PostPosted: Wed Nov 30, 2005 4:05 am
Post subject: Re: Database: Auto Backup functionality

Hi,
Is there a way to do a backup and email a link to that backup. Because all the cron backup I looked at (automysqlbackup.sh, cronjob.sh) seem to email the all backup?
Thanks

_________________



tour93's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.39/4.1.22/4.4.7/Dragonfly9.1.2.1
Back to top
View user's profile Visit poster's website MSN Messenger
FrontRunner
Nice poster
Nice poster

Offline Offline
Joined: Feb 27, 2005
Posts: 62
Location: Netherlands
PostPosted: Wed Nov 30, 2005 1:25 pm
Post subject: Re: Database: Auto Backup functionality

tour93 wrote:
Hi,
Is there a way to do a backup and email a link to that backup. Because all the cron backup I looked at (automysqlbackup.sh, cronjob.sh) seem to email the all backup?
Thanks

I think that it should be possible with a little hack of these scripts (soz, i cant do it). What I´ve done is opened an additional Gmail-account (it can hold 2,7gb of data) and have my back-ups emailed to it! That way i have a back up on the server and one in gmail.

If you´re in need of an gmail account, contact me!!

_________________


FrontRunner's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1
Back to top
View user's profile Visit poster's website
tour93
Gold Supporter
Gold Supporter

Offline Offline
Joined: Apr 20, 2004
Posts: 526
Location: florida
PostPosted: Wed Nov 30, 2005 1:41 pm
Post subject: Re: Database: Auto Backup functionality

ok thanks, but I already have some gmails account.

_________________



tour93's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.39/4.1.22/4.4.7/Dragonfly9.1.2.1
Back to top
View user's profile Visit poster's website MSN Messenger
tsykoduk
Nice poster
Nice poster

Offline Offline
Joined: May 31, 2004
Posts: 103
Location: a Chair
PostPosted: Wed Nov 30, 2005 9:18 pm
Post subject: Re: Database: Auto Backup functionality

Hold on a sec...

Try this script:

Code::
cd ~/backup
rm backup5.sql
mv backup4.sql backup5.sql
mv backup3.sql backup4.sql
mv backup2.sql backup3.sql
mv backup1.sql backup2.sql
mv backup.sql backup1.sql
mysqldump --all-databases >backup.sql
cat backup.sql |mail -s "Backup" -t  tsykoduk @ gmail.com

This did not work on my host - the mail command is disabled. If your host is more freindly, that should work fine. I use a simlar command to email me reports from my work servers.

_________________
For a Good Time
For a Bad Time
For a Geeky Time


tsykoduk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS X 10.8.2.1/3.9/8.2/1.0alpha/Next Gen
Back to top
View user's profile Visit poster's website ICQ Number AIM Address MSN Messenger Yahoo Messenger
tour93
Gold Supporter
Gold Supporter

Offline Offline
Joined: Apr 20, 2004
Posts: 526
Location: florida
PostPosted: Wed Nov 30, 2005 9:24 pm
Post subject: Re: Database: Auto Backup functionality

Hi tsykoduk,

Quote::
cd ~/backup
I create this folder, backup, where the "blocks" folder is?

Quote::
mysqldump --all-databases >backup.sql
Do I need to replace all-database with the name of my db?

Do I need to save that script as a .sh and call it with a cron job?

Embarassed

_________________



tour93's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.39/4.1.22/4.4.7/Dragonfly9.1.2.1
Back to top
View user's profile Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page    Forum Index ⇒  Requests
Page 1 of 2
All times are GMT
Go to page 1, 2  Next

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy