Learn about Centmin Mod LEMP Stack today
Become a Member

Backup database and then get only new data per hour

Discussion in 'MariaDB & General MySQL news & discussions' started by pamamolf, Mar 12, 2019.

  1. pamamolf

    pamamolf Well-Known Member

    4,128
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    6:14 PM
    Nginx-1.29.x
    MariaDB 10.6.x
    Hello


    Does anyone knows/use any script that can get a database backup and then get only the new data per hour as backup and at the end be able to restore at any hour?

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    60,080
    12,580
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,234
    Local Time:
    1:14 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    MySQL can do that natively for InnoDB tables at least with InnoDB binary logging (also used for MySQL replication) and rollback which you can configure and setup if you know what you're doing. Read up on InnoDB binary logging which is usually the MySQL default enabled but disabled by folks and Centmin Mod as it uses up alot of disk space - busy/large MySQL data set can use 100s of gigabytes of extra disk space doing InnoDB binary logging.

    Alternatives for incremental backups also include mydumper and Percona's Xtrabackup or MariaDB's own fork MariaBackup Mariabackup