I have a shared hosting account and I want to create a zip (or another archive type) file from whole website.

I asked the hosting support but they don't do this.

Is there any php or Asp.Net script that creates an archive from folder that I can check the compression status, to know it is running and not frozen.

My server has Windows Server 2003 and IIS6 with Plesk 8.6 Control panel.


3 Answers 3


Can you not download all the files via FTP, then use your computer to put them in a .zip file? That seems to be the only way to get the files. If you have cPanel, I think there is a tool to download a backup of the site in .zip format already.

  • No. I Can't! there is lots of files... Also my hosting control panel is plesk. Commented Feb 27, 2012 at 23:35
  • I can download all of the files for you, (approximately how much data is there?) and then upload a .zip to one of my servers for you to download. Message me if you want me to do that. Otherwise, there's not much else I can help you with. ramui.com/articles/php-zip-files-and-directory.html may help, where you run a PHP script and it will zip all the contents of the folder on the server itself.
    – ionFish
    Commented Feb 27, 2012 at 23:51
  • How to send message for you? stackexchange has not private messaging system. Commented Feb 27, 2012 at 23:55
  • you mean [email protected] ?? Commented Feb 27, 2012 at 23:58
  • Ok. I'll try myself and if I need help, I'll contact you. Thanks. Commented Feb 28, 2012 at 0:01

Most managed hosting providers do daily backups for you. You should be able to just ask them for one of the backups.

Alternatively, if you were on a *nix server, you could just use tar to create a tar.gz archive of your app root. If it only takes 2-3 seconds to archive, there's not much point in a progress bar. If it takes longer, you could use the --list/--index-file or --verbose options to see the files/directories as they're being archived. Or you could use --checkpoint or --block-number to see the record/block numbers as they're processed.

But unlike uploads/downloads, compression progress isn't linear enough to accurately display progress percentage. At best you can use pv to track the number of input bytes processed versus total input size, but the progress bar could go from 0% to 90% in 5 seconds and then take the next 5 minutes to go from 90% to 100%.

Also, it's not like the percentage progress really matters—it's not as if you're gonna decide to pause or cancel the compression. Knowing that it's making progress and hasn't frozen is more important. And this can be easily achieved by using the --list switch to provide a live output of the processed files. You can accomplish all of this with a few lines of PHP and JS.

If you want more accurate progress indication, then you'd have to record how long it took you to archive the site last time and project how long it might take given the current directory size. Assuming the distribution of file types and data characteristics haven't changed significantly, you might be able to get fairly accurate estimates. Or you could go one step further and characterize the compression characteristics (speed/ratio) of specific file types and use that and your app's filetype distribution to calculate the progress.


I have used the SharpZipLib with VB.NET (or C#) with a sample application from their website that creates a tar.gz file from a directory.


It hasn't progress bar, but I can check if it is complete or frozen by checking the size of tar.gz file via ftp.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.