is there a way to...


…somehow zip, or batch, files together via php? I’m wanting to create an auto-back-up tool of my site, since a lot of people contribute to it and it’s not impossible that the network could go down. I can happily tell a script to go find all the files, but is there any way in PHP to group them and send them back as one file to write somewhere? I imagine not, but hey. If not, is there some other accepted standard for this sort of thing?

Cheers in advance.


only worth $0.02


If your server is running linux, you can probably simply use tar to group the files, bzip2 to compress them and scp to send it to an other server over SSH. All you need is the exec() function to run them. You will probably need a shell access to do the setup for scp (such as setting public keys on servers). Otherwise, you can use PHP to open an FTP stream and write the file on the otherserver.