title: How do I make a database backup and have it stored locally?
body: <p>So here's the challenge. I need to use C# to back up a database locally from a remote database server and the only share we have is \\computer\c$.</p>
  
  <p>If the answer is to back up to a location on the remote database server and then copy that local, assume there is not a share on the remote location.  Just b/c I have access to the database does not mean I have access to the file system.</p>
  
  <p>This Q/A looks close to what I want, but remember the regular account in the database will not have access to the network. <a href="https://stackoverflow.com/questions/128166/sample-sql-script-to-zip-and-transfer-database-backup-file">Sample sql script to zip and transfer database backup file</a> </p>
  
  <p>With all of that in mind...anyone done something like this and care to share? Or have an idea of how to do this?</p>
  
  <p>UPDATE: I was being vague on purpose.  The context here is this:</p>
  
  <ol>
  <li>I do not have access to files on the server where the database is.</li>
  <li>I am running the C# from the client under the client's credentials, so I have full control of the client computer and can do anything in this domain.</li>
  </ol>
  
  <p>I think I actually have figured out what we are going to do though:</p>
  
  <ol>
  <li>Create a special folder in the AppData area of the current user.</li>
  <li>Create a fileshare to that folder</li>
  <li>Add rights to Everyone for that particular share and folder.</li>
  <li>Process the backup based on that share.</li>
  <li>Remove the share and reset the permissions.</li>
  </ol>
  
  <p>In case anyone is curious what this question refers to: <a href="http://code.google.com/p/roundhouse/issues/detail?id=3" rel="nofollow noreferrer">RoundhousE</a></p>