Mobile app version of vmapp.org
Login or Join
Welton855

: Looking for archiver script with status 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

@Welton855

Posted in: #AspNet #Iis6 #LookingForAScript #Php

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.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton855

3 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer257

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.
wiki.sharpdevelop.net/GZip-and-Tar-Samples.ashx
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.

10% popularity Vote Up Vote Down


 

@Ogunnowo487

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.

10% popularity Vote Up Vote Down


 

@Ravi8258870

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme