1

Full edit:

The scenario is that after uploading the file to the server via a secured web service, I'd like to save/create a copy of that file to another server in a LAN or another network.

I'd like to know what possible ways I could use to programmatically copy/create the backup of the file uploaded to the backup server (saving the file to the database would be the last option probably).

Here are a few details:

  • Files are of different types and sizes mostly text, documents and images that would be around a few KB to a couple of MB's.

  • Database is SQL Server 2008 R2 and the only way to connect to it is via calls to a secured WCF service.

  • Servers can be in the same LAN or on separate networks (depends on the client requesting).

  • The 2nd server is a redundant server and is using the 1st one as it's backup and vice versa.

Bahamut
  • 1,929
  • 8
  • 29
  • 51
  • It's really hard to figure out what you're asking here. For example, is there a reason you're not just using scp or some variant to move files? What do you define as "easy" or "safe"? What is your final desired result? – lc. Jan 15 '12 at 07:42
  • @lc my reason would likely be because I don't know what scp is and other ways. Please refer to my question. I'm pretty sure that is clear and self explanatory. – Bahamut Jan 15 '12 at 08:32
  • @lc ok I googled what scp is and it's pointless since I'm using windows for both servers. I did include the sql-server tag but probably you missed that detail. I'll update the post to clarify this. – Bahamut Jan 15 '12 at 08:36
  • 1
    It is clear you are on Windows to me, but what you are actually asking is not. – Andrew Barber Jan 15 '12 at 08:46
  • @AndrewBarber question is pretty clear. Please refer to the title and the question near the bottom of my post. – Bahamut Jan 15 '12 at 14:08
  • 1
    Agreed. I've no idea what you're asking. Perhaps you should rephrase the question, giving some background to your problem. There are lots of ways to backup files. which approach often depends on what you're trying to achieve.... Perhaps you're not talking about file backup? For example if you're using MySQL as your database it's possible to replicate content to the backup server automatically... Hopefully you now understand our confusion – Mark O'Connor Jan 15 '12 at 15:28
  • 1
    Please don't prefix your titles with "c# .NET: " and such. That's what the tags are for. – John Saunders Jan 15 '12 at 16:38
  • @JohnSaunders I was in the process of re-editing the post along with the title. Thanks for the suggestion and edit though. – Bahamut Jan 15 '12 at 16:55

1 Answers1

0

Took me a while to find this post. Just map the drive to the backup server's shared folder and implement WindowsImpersonationContext.

How to Impersonate a user in managed code?

haven't seen security problems on this and doesn't need to mess with the HTTP/certificates.

Community
  • 1
  • 1
Bahamut
  • 1,929
  • 8
  • 29
  • 51