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
https://forums.phpfreaks.com/topic/60330-site-compression/
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
https://forums.phpfreaks.com/topic/60330-site-compression/#findComment-300315
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
https://forums.phpfreaks.com/topic/60330-site-compression/#findComment-302100
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.