Lock a database or take a snapshot of DB

Hello, 

 

We want to take an export of all tables and views from DB. As the export of 180 entities can take time, there should not be any data updated on the DB duing the export period.

To do this, can we lock the MySQL DB for a some period of time. I am afraid a lock can create failures to users if any write fails.

Are there any other options like taking a snapshot of DB from Appian? Let us know.

 

Thank you,

Harish 

 

  Discussion posts and replies are publicly visible

  • I'm not aware of any functionality that can completely lock down the database.

    My recommendation is to create a scheduled job that will run in the middle of the night when few users are working in the system. You can use this shared component and create a process initiated on a timer.

  • Hello Harish,

    I am guessing you are On premise?

    When talking about backups/snapshots there are multiple techniques, I guess you want to have a snapshot instance? For testing or UAT? You are just trying to copy the data, not Appian information, correct?

    Using the DB tools will be always the best option, it will help you to prevent inconsistencies and if you have large amounts of data I totally recommend the incremental option.

    NOTE: if you choose to make exports or dumps, don’t ever try to do the export from a remote computer because it will add one more layer to the processing time.

    Refer to MySQL documentation
    dev.mysql.com/.../backup-methods.html

    José Perez
  • 0
    Certified Lead Developer

    came across this questions after many years today. one approach will be to display outage message on users screen while taking backup of the DB. If only certain part of the application deals with database, list out all UI/Process that might write into DB and use a constant to toggle the UI to show outage message. Once the DB export is done, we can toggle back the constant which will enable UI that write into DB. This is only when part of application uses data write and the requirement is to still run the rest of the application for a larger user base. If the application is entirely data driven, then its better to announce a proper outage for such activities if the app is 24*7, if not we could always choose a weekend where users are not logged in