I have an ASP.NET web app on a shared hosting server and a SQL Server database on a database server. I would like to backup and restore the database programmatically in the web app where the site owner can download/upload the backup file from a browser. Looking for a solution which works in medium trust. I think SMO (shared management objects libraries) requires full trust and not sure if it even meets my needs. Writing files on the database server, using a control panel or SSMS is not an option.
While I might be able to write SQL Scripts to do all this work, it's going to take some time to have it work reliably for any database. I was wondering if these kind of scripts or a suitable library is available.