Jump to content

Site compression


michaelwl

Recommended Posts

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.

Link to comment
Share on other sites

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 :/

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.