michaelwl Posted July 17, 2007 Share Posted July 17, 2007 I'm new to PHP, just started up a website running osCommerce. My host doesn't allow SSH connections to my web space. I've been doing periodic backups via FTP, but that's so SLOW! Is there a way to write some PHP that would compress all the files in a certain dir and store them in some archive I could just download? Any assistance would be appreciated even if it's a completely other way of doing it... Thanks. Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted July 17, 2007 Share Posted July 17, 2007 you could run a cron job to backup the database and store all the source files on your local machine. that's probably the easiest way to do it. Do you have access to a cron tab on your server? Quote Link to comment Share on other sites More sharing options...
michaelwl Posted July 17, 2007 Author Share Posted July 17, 2007 Yip I remember seeing a Cron tab in my server settings.... I check it out but I have no options there, suppose I need to speak to my service provider to see if they can do, except they didn't mention it previously, just said that they'll have to compress it for me :/ Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 17, 2007 Share Posted July 17, 2007 don't bother compressing you scripts - just back up the database at regular intervals. If anything happens to your scripts just upload them again - better using a little space on yoru machine that on the server - especially as it will be very rare that you need to use it. Quote Link to comment Share on other sites More sharing options...
michaelwl Posted July 19, 2007 Author Share Posted July 19, 2007 I need a mechanism I can use to quickly backup and recover while I'm busy developing and changing things on the site... My Service Provider can't help with something I can use my self... The only advice the guy could give was... : The best I can recommened is to get a script that run the command "tar czfv backup.tgz /var/www/vhosts/domainname/httpdcs/*" to zip up the contents, and another script to delete old files then extract those files again. What would the php look like to run the tar command above, and then from that I assume you'll do a similar script to delete made archives.... ? Thanks, I appreciate all the help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.