View Full Version : Backup site
zSynopsis
1-31-05, 11:42 PM
Hi.
I was wondering if there was a way, besides going through each file using a ftp client, to backup a site all at once? Kinda like cpanel on other sites have. I wanted to have a backup on my comp for like each week *-).
BerksWebGuy
1-31-05, 11:45 PM
There is always site manager - www.yoursite.com/+sitemanager
Or you can go to B&T's script page and look for the backup script HERE (http://www.prettyworthless.com/tips.php).
There is always site manager - www.yoursite.com/+sitemanager
Or you can go to B&T's script page and look for the backup script HERE (http://www.prettyworthless.com/tips.php).
Hmmm, B&T's script is for automated mysql backups, and I thought sitemanager only allowed you to recover one file at once? I've tried tarring my site in many many different ways, so I logged a ticket and the techs said they'd do it for me. Might be worth a shot.
BerksWebGuy
1-31-05, 11:55 PM
You can always use this:
<?php
echo "<pre>";
$filename = date("Ymd")."backup.tgz";
$dir = "/www/u/username/folder";
system( "tar -czf $filename $dir 2> errors;cat errors;rm errors" );
?>
zSynopsis
2-1-05, 12:45 AM
okay thnx suppose i wanted to backup the folder htdocs
all i'd have to change is
"/www/u/username/htdocs";
u and username being dif for mysite ofcourse.
And upload the file and run it?
Sorry im not that good with php lol
BerksWebGuy
2-1-05, 09:17 AM
Thats right...you got it. Good Luck :cool:
zSynopsis
2-1-05, 12:19 PM
thanks. Do i upload it within the htdocs folder and navigate to it to run it. i.e.
http://www.mysite.com/backup.php ?
okay i created a folder within my htdocs called backup and put the page in it and here's what i got when i navigated to it.
tar: Removing leading `/' from member names
tar: /www/m/mysite/htdocs/backup/20050201backup.tgz: file changed as we read it
tar: Error exit delayed from previous errors
mysite is actually not my sites name lol i just tought itd be better to hide it :p
BerksWebGuy
2-1-05, 12:36 PM
Looks like someone was changing something on your site during the backup. If you see the "tar: Removing leading `/' from member names" line...thats OK.
zSynopsis
2-1-05, 12:37 PM
oh.. could be that i have members posting on the forums?
no it isnt cause i tried it with the board offline and same message *-)
is it because the backup folder in within the same folder it is backing up?
i.e. ./htdocs/backup/backup.php
and the folder im trying to back up is htdocs
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.