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 9034039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:23:06+00:00 2026-06-16T08:23:06+00:00

I have a ASP.NET web-application with a MySQL database behind. My users wants to

  • 0

I have a ASP.NET web-application with a MySQL database behind.
My users wants to make a backup of their data when clicking on a button.
How should I do that?

I was thinking of using mysqldump to create a database and let the user download this file.
But is that the easiest way? And what about performance ? I have currently 250 users working an the webapplication at the same time. So when they all press the backup button … I don’t want to let my server hanging while creating the backup.

Does anyone have an idea?

Thx

  • 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-06-16T08:23:07+00:00Added an answer on June 16, 2026 at 8:23 am

    You can try this tool: MySqlBackup.NET, which is an alternative to MySqlDump.

    Official Site & Documentation > http://mysqlbackupnet.codeplex.com/

    Backup & Download a MySQL Database

    void Backup()
    {
        string connection = "server=localhost;user=root;pwd=qwerty;database=test;";
        string fileOnDisk = HttpContext.Current.Server.MapPath("~/MyDumpFile.sql");
        // Example Result: C:\inetpub\wwwroot\MyDumpFile.sql
        string fileOnWeb = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) 
                           + "/MyDumpFile.sql";
        // Example Result: http://www.mywebsite.com/MyDumpFile.sql
    
        // Backup MySQL Database
        MySqlBackup mb = new MySqlBackup(connection);
        mb.ExportInfo.FileName = fileOnDisk;
        mb.Export();
    
        // Download the file
        Response.ContentType = "text/plain";
        Response.AppendHeader("Content-Disposition", "attachment; filename=MyDumpFile.sql");
        Response.TransmitFile(fileOnDisk);
        Response.End();
    } 
    

    Restore a MySQL Database

    void Restore()
    {
        string connection = "server=localhost;user=root;pwd=qwerty;database=test;";
        string fileOnDisk = HttpContext.Current.Server.MapPath("~/MyDumpFile.sql");
        string fileOnWeb = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) 
                           + "/MyDumpFile.sql";
        // Upload the file
        if (FileUpload1.HasFile)
        {
            FileUpload1.SaveAs(fileOnDisk);
    
            MySqlBackup mb = new MySqlBackup(connection);
            mb.ImportInfo.FileName = fileOnDisk;
            mb.Import();
            Response.Write("Import Successfully");
        }
    }
    

    From the above example, MySqlBackup.NET will create a file name MyDumpFile.sql (The exported MySQL database).
    You can cache the file for 5 or 10 minutes. If any user wants to get the exported MySQL Backup File within 5 or 10 minutes from time of creation, the cache file will be transmitted for his/her to download. If more than 5 or 10 minutes, new cache file will be generated again.

    I am one of the author of this tool.

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

Sidebar

Related Questions

I have to make a virtual filesystem in MySql (using asp.net as the web-application).
I need to develop web application using ASP.net with C# to handle mysql database
we have an ASP.net web application running on IIS7. We have multiple users, but
I have a asp.net web application that uses C#. It logs in on a
I have an ASP.NET web application the entire site is browsed over HTTPS using
I have an asp.net web application written in C# using a SQL Server 2008
We have an ASP.NET web application hosted by a web farm of many instances
I have a ASP.NET web application which has more than 100 pages. Each page
I have an ASP.NET web application and I want to be able to take
I have a asp.net web application and I'm using cache (HttpRuntime.Cache) to save some

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.