List:General Discussion« Previous MessageNext Message »
From:Rithish Saralaya Date:March 10 2006 7:25am
Subject:RE: mysqldump backup on filters
View as plain text  
>>Your table is missing. Try this:

>>mysqldump --single-transaction -u root clientdb <table>
>>--where="FLD_CLIENT_ID=1" > client1_dbbackup.sql

>Yes. The tables are missing. That's because I want the backup of all the
>tables in the db, and those tables that have the column FLD_CLIENT_ID, they
>should be filtered by the where clause.
>This is because, if we are to reproduce the system for a client, then all
>need to do is to run this backup on a new db.

So, it looks like I will have to backup the db in phases.

1. Backup client-specific tables
mysqldump --single-transaction -u root clientdb table_M1 table_M
table_MX --where="FLD_CLIENT_ID=1" > client1_dbbackup.sql

2. Then append the other tables to the backup.
mysqldump --single-transaction -u root clientdb table_N1 table_N2 table_NX
>> client1_dbbackup.sql

However, this means that I cannot take a backup when the system is up and

Any other ideas, folks?


mysqldump backup on filtersRithish Saralaya2 Mar
  • RE: mysqldump backup on filtersMarciano [Intercol]2 Mar
    • RE: mysqldump backup on filtersRithish Saralaya3 Mar
      • RE: mysqldump backup on filtersRithish Saralaya10 Mar
        • Re: mysqldump backup on filterssheeri kritzer14 Mar