Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Backing up your database
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Backing up your database
Backing up your database
31-03-2008 9:37 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Has anybody written any php code yet to backup the MySQL database?
My plan is to login a secure part of my website and run a bit of script to back up all my data but i wondered if anybody else has already done this. It will be a lot quicker than using the PHP MyAdmin area etc
No point in re-inventing the wheel eh?
My plan is to login a secure part of my website and run a bit of script to back up all my data but i wondered if anybody else has already done this. It will be a lot quicker than using the PHP MyAdmin area etc
No point in re-inventing the wheel eh?
Message 1 of 6
(1,550 Views)
5 REPLIES 5
Re: Backing up your database
31-03-2008 11:33 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Have you tried http://mysql.com/products/tools/administrator/ ?
Run that on your PC specifying the server name as rumpus.plus.net or humbug.plus.net and backup direct to your PC. It's a lot faster than phpmyAdmin.
Run that on your PC specifying the server name as rumpus.plus.net or humbug.plus.net and backup direct to your PC. It's a lot faster than phpmyAdmin.
jelv (a.k.a Spoon Whittler) Why I have left Plusnet (warning: long post!) Broadband: Andrews & Arnold Home::1 (FTTC 80/20) Line rental: Pulse 8 Home Line Rental (£14.40/month) Mobile: iD mobile (£4/month) |
Message 2 of 6
(329 Views)
Re: Backing up your database
31-03-2008 12:02 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for your help. Looks like this could be the answer
Message 3 of 6
(329 Views)
Re: Backing up your database
31-03-2008 10:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Could do it yourself in a number of ways,
and make it create an enitre snapshot of entire directory trees of your Webspace,
all in a Tar GZip..
backup.sh
You should replace "*" with direcotries needed followed by the asterisk,
else you'll fill up your webspace in the process of backing up.
Examples:
admin/*
logs/*
scripts/*...
Then you have two options of running it...
Directly via SSH or by utilising the PHP system()" command (or similar) and creating it around your own Adminstration system.
Hope this throws up some options.
Jim,
and make it create an enitre snapshot of entire directory trees of your Webspace,
all in a Tar GZip..
backup.sh
#!/bin/sh
set $BACKUPDIR="~/path/to/backups"
echo Backing up Databse 'database_pn'... to filename 'database.sql'
mysqldump -h HOST -u USER -pPASSWORD database > "$BACKUPDIR/database.sql"
echo Backing Up Dev-Center Website & Database SQL... to filename site-`date '+%m/%d/%y'`-backup.tar.gz
tar cfz $BACKUPDIR/site-`date '+%m-%d-%y'`-backup.tar.gz *
echo Removing Temporary SQL File Backup
rm $BACKUPDIR/database.sql
You should replace "*" with direcotries needed followed by the asterisk,
else you'll fill up your webspace in the process of backing up.
Examples:
admin/*
logs/*
scripts/*...
Then you have two options of running it...
Directly via SSH or by utilising the PHP system()" command (or similar) and creating it around your own Adminstration system.
Hope this throws up some options.
Jim,
Message 4 of 6
(329 Views)
Re: Backing up your database
01-04-2008 4:18 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for your help Jim.
In the meantime i had followed the suggestion from jelv and it gives me exactly what i need. However, because i administer my site from different places, creating my own administration script gives me more flexibilty instead of installing a stand-alone package on each pc that i work from. (Home, work, laptop etc) so in the long term, i will probably go down the scripting method.
As it happens, i've got the best of both worlds for now, thanks
In the meantime i had followed the suggestion from jelv and it gives me exactly what i need. However, because i administer my site from different places, creating my own administration script gives me more flexibilty instead of installing a stand-alone package on each pc that i work from. (Home, work, laptop etc) so in the long term, i will probably go down the scripting method.
As it happens, i've got the best of both worlds for now, thanks
Message 5 of 6
(329 Views)
Re: Backing up your database
01-04-2008 10:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Ahh,
good at least you have a solution which works for you.
That's all that matters
And no problem, I'm glad you saw some kind of use in it
Jim,
good at least you have a solution which works for you.
That's all that matters

And no problem, I'm glad you saw some kind of use in it

Jim,
Message 6 of 6
(329 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Backing up your database