Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4271838
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:29:47+00:00 2026-05-21T07:29:47+00:00

I have make Some Differential Backup for a Database, which will take the Backup

  • 0

I have make Some Differential Backup for a Database, which will take the Backup for the Last Modified Data which will be appended to the previously happend Full Backup file. Now, when i am trying to take Restore of the .bak file entire Data is getting Backup, is it possible to take the Backup only the Last Backup taken data i wanted? Can, any one help me on this.

private void RestoreDataBase(Server MyServer, Database MyDataBase, string DevicePath, string Type)
     {
         try
         {
             progressBar1.Value = 0;
             Restore restoreDB = new Restore();
             restoreDB.Action = RestoreActionType.Database;
             restoreDB.Database = MyDataBase.Name;
             restoreDB.Devices.AddDevice(DevicePath, DeviceType.File);
             restoreDB.ReplaceDatabase = true;
             restoreDB.NoRecovery = true;
             restoreDB.PercentComplete += new PercentCompleteEventHandler(rstDatabase_PercentComplete);
             restoreDB.Complete += new ServerMessageEventHandler(rstDatabase_Complete);
             restoreDB.SqlRestore(MyServer);
         }
         catch (Exception ex)
         {
             WriteToListView(ex.Message.ToString());
             writetoLog(ex.Message.ToString());
         }
     }

The above is the coding i am using, and the database is Sql Server 2008, The coding i am using for Differential Backup is as follows

private void BackupDataBaseDifferential(Server MyServer, Database MyDataBase, string DestinationPath, string Type)
     {
         try
         {
             WriteToListView("Taking the Differential Backup for " + MyDataBase.Name);
             Backup backDB = new Backup();
             backDB.Action = BackupActionType.Database;
             backDB.Database = MyDataBase.Name;
             backDB.Devices.AddDevice(DestinationPath, DeviceType.File);
             backDB.BackupSetName = "Sql Database Backup Differential";
             backDB.BackupSetDescription = "Sql Database Backup - DifferentialType";
             backDB.ExpirationDate = DateTime.Now.AddDays(5);
             backDB.Initialize = false;
             backDB.Incremental = true;
             if (Type == "Manual")
             {
                 progressBar1.Value = 0;
                 backDB.PercentComplete += new PercentCompleteEventHandler(bd_PercentComplete);
                 backDB.Complete += new ServerMessageEventHandler(bd_Complete);
             }
             else if (Type == "Automatic")
             {
                 backDB.PercentComplete += CompletionStatusInPercent;
                 backDB.Complete += Backup_Completed;
             }
             backDB.SqlBackup(MyServer);
         }
         catch (Exception ex)
         {
             WriteToListView(ex.Message.ToString());
             writetoLog(ex.Message.ToString());
         }
     }

So, if i use the above coding the last data which is modified in the Database (which was already taken Backup Fully previously) will be taken. So, my problem is when i use the RestoreDataBase() method the entire Database is getting restore, bcoz all the Full Backup data and the Differential Backup data will be in only one file ex: Sample.bak. If i want only the last modified data is it not possible to take by Specifying the Date of the Data modified to the Database?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:29:48+00:00Added an answer on May 21, 2026 at 7:29 am

    Maybe silly, but if you export your db as .sql, when you need to restore only some data, you can read file and “filter” rows to restore…
    Anyway there is another thread talking about this, take a look here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Linux web server and I'd like to make some database tables
I have a small namespace containing some type definitions, which I use to make
I am trying to make some changes to an oracle database and have a
I have the following code with a structure array with data to make some
I'd like to make some custom MenuHeaders in WPF so I can have (for
I have some question: How to make a role based web application? Such as
I have created some extra functionality on my Linq-to-SQL classes to make things easier
Some people have suggested that when doing an estimate one should make a lower
I have a control which I have to make large modifications to. I'd like
I'm playing with a GWT/GAE project which will have three different pages, although it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.