I think you can do what you won in this way.
Find a zip library like SharpZipLib and you just program to create a zip file and include the main path to HttpContext.Current.Request.PhysicalApplicationPath applications, including all the paths.
Save this created zip file in the tempo directory and just upload it.
This is a quick fix and maybe some problems, for example, you probably cannot open locked files ...
If you won to back up only your database, you have to make different thoughts.
I hope for this help.
source share