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
--verbose options to see the files/directories as they're being archived. Or you could use
--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.