Scheduling Database Backup

You may need to schedule an automated database backup that will recur periodically. To do this, first of all, you will need to create a project file, containing backup settings. Once the project file is created, you have to schedule Windows task that will perform actions at a specific time or when a certain event occurs.

Creating a project file

  1. In the Database menu, select Backup and Restore, and then click Backup Database. Database Backup Wizard opens.

  2. On the General tab of the wizard, specify Connection, Database, Path, Output filename. Click Next.

    DB Backup Wizard

  3. On the Backup content page, select database objects to backup. Click Next.

  4. On the Options page, specify detailed options of how the backup should be performed. Click Next.

  5. Set the Errors handling and Log settings options. Click Save Project.

Scheduling Windows task

  1. Start Task Scheduler for Windows.
  2. Select Action, Create Basic Task in the top menu.
  3. Provide Name for the new task. Click Next.
  4. Select one of the options when you want the task to be started. Click Next.
  5. Select time and frequency for starting the task. Click Next.
  6. Select Start a Program and click Next.
  7. Enter path to the schemacompare.com file in Program/script (The default path is C:\Program Files\Devart\dbForge Schema Compare for MySQL\schemacompare.com).

  8. Also, make sure to specify arguments in the Add arguments field as follows:

    /backup /connection:"User Id=root;Host=db;Port=3309;Database=sakila;Character Set=utf8;" /projectfile:"C:\Users\Documents\dbForge Schema Compare for MySQL\Export\sakila.backup"
    
  9. Click Next.
  10. Check all specified settings once again and, if no changes are required, click Finish. Otherwise click Back and make the appropriate changes.