Link to home
Start Free TrialLog in
Avatar of Mohammad Alsolaiman
Mohammad AlsolaimanFlag for Saudi Arabia

asked on

Button to restore backup data programmatically!

Hi,
I have two copies of a web application has been written in ASP.net C#. One application is online and the other one is off-line, I need to have the same data(SQL database with more than 20 tables)  in the online one to be transferred to the off-line  one programmatically. I will have a backup data from the online one on a USB and then I need to have a button in the offline application to restore these data. how could I do such a thing?
 please help &  thanks in advance.
Avatar of Mohammad Alsolaiman
Mohammad Alsolaiman
Flag of Saudi Arabia image

ASKER

The data to be transfer is more than 3GB of data.
Avatar of noci
noci

export data on one side and re-import it onthe other side...
Can you take online backups? The output of backup mostly is such an export.
The only way is by using USB
online backup from database -> file (on USB)
(or take database offline and make backup to file on USB).
then move USB and import backup file in offline database.
I already have the backup database on USB, and need to delete the old one in the offline laptop and the restore from USB. I need to do so, via a button control on the offline web app on the laptop.
So that involves building a script to get the data from the USB (and delete it from the USB), then import it into the off-line database.
and Activating the script when a button on the web app is pressed.

First create such a script (or two scripts  one to copy data, one to import).
Then integrate those buttons.  I hope someone else  can create the code for you..., I read this Q as how to solve the issue of getting data accross, not write a C#, script as such).
I hope if there is someone can help with the code. And thank you noci for trying to help me.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.