View Full Version : General website-backup question
phoginator
6-3-05, 01:29 PM
Right now in regard to backups I'm:
-saving my sql database with halfabee's script regularly;
-and also actually downloading my entire 'htdocs' folder to my local computer about once a week to backup all that data;
Couple questions-
-if my site got completely hacked and/or crashed would I be able to restore it by restoring the database and reuploading the htdocs folder?;
-is the above adequate (and/or necessary) backup procedures;
Maybe naive questions but I've never had to do a complete restore- just wanna be protected if I have to.
BerksWebGuy
6-3-05, 01:58 PM
The database backup (daily) is a great idea, since it can be restored pretty easily.
For the site files, check out B&T's www.tips-scripts.com for a script that backups your entire site into a tar file (then you can just download that). Depending on your site size, this will be a lot quicker than downloading the entire site.
phoginator
6-4-05, 02:09 AM
Thanks for the link. :)
Sounds like i'm good then- not that i'll ever need it. ;)
NeilFawcett
6-5-05, 06:21 AM
Remember you cannot user sitemanager to access directories with a lot of files in. Due to the fact it gets the CHMOD and size of every file it lists (unecessarily) this can burst the (secret) 20 second process CPU limit resulting in a terminated process and blank screen.
I've suggested to support they simply display the CHMOD and size on an optional tick box, therefore making sitemanager FAR more server friendly... But I suspect it will never happen, unfortunately.
This basically means in any directory where you have a lot of files, you cannot use sitemanager to restore data... All for the sake of one tick box option... :(
Croc Hunter
6-5-05, 09:21 AM
Their question was answered Niel. Sitemanager was never even mentioned..
You never let an opportunity to kick someone in he nuts pass you by do you Niel. Heh. Glad I'm not one of your friends.
NeilFawcett
6-6-05, 06:17 AM
Their question was answered Niel. Sitemanager was never even mentioned..
You never let an opportunity to kick someone in he nuts pass you by do you Niel. Heh. Glad I'm not one of your friends.
Have a bad weekend? He was talking about restoring files to the htdocs folder..
ps: I'm glad you're not my friend as well... You can't even spell my name right...
The database backup (daily) is a great idea, since it can be restored pretty easily.
For the site files, check out B&T's www.tips-scripts.com for a script that backups your entire site into a tar file (then you can just download that). Depending on your site size, this will be a lot quicker than downloading the entire site.
Can you direct me to the site backup script? I must be blind....or it is a monday...I can not find it :). Would be much easier than the way I do it now (Download and zip on my home system.
Thanks.
BerksWebGuy
6-6-05, 02:09 PM
The PHP script is
<?php
echo "<pre>";
$filename = date("Ymd")."backup.tgz";
$dir = "/www/u/username/folder";
system( "tar -czf $filename $dir 2> errors;cat errors;rm errors" );
?>
Just run this php script (after you change the $dir to your path). Also, if you have alot of site files, the script may time out, and you may have to break-down the $dir into subfolders.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.