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

  • SEARCH
  • Home
  • 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 5970479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:22:48+00:00 2026-05-22T20:22:48+00:00

Suppose a row (several rows) or table in database. Can I backup them, to

  • 0

Suppose a row (several rows) or table in database. Can I backup them, to restore as quick as possible only them if the rows/table will be corrupted.

thank you in advance!

  • 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-22T20:22:49+00:00Added an answer on May 22, 2026 at 8:22 pm

    I use the following perl-script to backup my databases:

    #!/usr/bin/perl
    use strict;
    use DBI;
    my $dbh = DBI->connect( "dbi:mysql:database=;mysql_client_found_rows=0;host=your.database.host", "username", "password", {RaiseError => 1});
    my $databases = $dbh->selectcol_arrayref('SHOW databases;');
    foreach my $t (@{$databases}) {
       system('/usr/local/bin/mysqldump -h your.database.host --add-drop-database --add-drop-table --add-locks --extended-insert=false --databases --allow-keywords -c -e -f -u username  --password=password \''.$t.'\' > /path/to/backupfiles/'.$t.'.sql');
       print "$t done\n";
       sleep(2);
    }
    

    The mysql-dump command is:

    /usr/local/bin/mysqldump -h your.database.host –add-drop-database –add-drop-table –add-locks –extended-insert=false –databases –allow-keywords -c -e -f -u username –password=password ‘databasename’ > /path/to/backupfiles/databasename.sql

    The result are single insert-statements for the whole table. You have to extract the lines you want to restore. Since you do not know which row will be damaged, you’ll need them all. To restore a single row, just find it in the backup-file and execute the command.

    I found it very difficult to deal with a backup file, that contains several databases. That’s the reason to write this little script and backup each database into a single file.

    You can alter the script easily, to dump each table into a single backup-file if needed.

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

Sidebar

Related Questions

For simplicity suppose I have one varchar(50) per row and these are my rows:
Suppose you have a table widget class. Do you do table.row(i).column(0).setText(students[i].surname()) or table[0][i] =
How can we programmatically take a GridView-row into Edit-mode using an Edit Command? Suppose
suppose i have table and code is <table cellspacing=1 class=style1 style=width:40%; border=1> <tr> <td>Row
I have a view that displays a table: rows represent days - one row
Suppose my gridview has a few rows and every row has a few textboxes.
Suppose I have a table in my database that is made up of the
Finding Duplicate Row with Count Numbers Suppose a table is given ID Name Age
Suppose I have a grid with some row definitions, and a child control in
What is supposed to happen is that a row gets inserted into a table,

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.