Meta tags:
description= How to back up MySQL, MariaDB or Postgres using Borg Backup?;
Headings (most frequently used words):
using, how, to, back, up, mysql, mariadb, or, postgres, have, any, other, questions, email, us, borgmatic, built, in, database, hook, recommended, standalone, backup, script, references,
Text of the page (most frequently used words):
the (12), #database (11), backup (10), and (9), dump (7), borgmatic (6), you (5), borg (5), all (4), databases (4), this (4), your (4), using (4), autopostgresqlbackup (3), automysqlbackup (3), hooks (3), before (3), use (3), script (3), are (3), content (3), copy (3), docs (3), restore (3), have (2), create (2), run (2), for (2), can (2), include (2), scripts (2), like (2), those (2), folder (2), running (2), get (2), name (2), mysql (2), postgres (2), one (2), built (2), that (2), there (2), ways (2), data (2), setup (2), restic (2), with (2), borgbase (2), link (2), references, any, other, questions, email, commands, action, when, usr, sbin, pre, most, popular, distributions, will, usually, save, daily, including, source, directories, timely, var, lib, standalone, postgresql_databases, mysql_databases, dbs, each, would, following, snippet, already, large, also, their, advantage, technique, read, via, named, pipe, never, written, disk, thus, saving, storage, space, hook, recommended, many, services, servers, require, whose, needs, backed, well, different, achieve, method, should, avoid, internal, directory, not, safe, files, while, service, better, way, compressed, actual, add, file, multiple, reviewed, may, 2026, how, back, mariadb, free, hosting, site, uses, documentation, theme, jekyll, just, ssh, keys, faq, api, pricing, mount, browse, archives, verify, import, export, truenas, synology, nas, ansible, containers, pika, vorta, command, line, strategy, home, copied, search, document, external, expand, menu, skip, main,
Text of the page (random words):
databases borgbase docs skip to main content link menu expand external link document search copy copied borgbase docs home strategy setup borg command line vorta pika backup containers ansible synology nas truenas databases restic import and export verify restore borg mount and browse archives restore with borg restore with borgmatic restic pricing api faq ssh keys this site uses just the docs a documentation theme for jekyll get 10 gb free backup hosting setup borg databases how to back up mysql mariadb or postgres reviewed in may 2026 many services and servers require a database whose content needs to be backed up as well there are different ways to achieve this using borg or borgmatic one method you should avoid is to copy the internal data directory of the database as it s not safe to copy those files while the database service is running a better way is to create a compressed dump of the actual data and add that file to the backup there are multiple ways to do so using borgmatic s built in database hook recommended if you are already using borgmatic and have a large database you can also use their built in database hooks to dump the database content and include it in your backup the advantage of this technique is that the database dump is read via a named pipe and never written to disk thus saving storage space to dump all mysql and postgres dbs before each backup one would use the following snippet 1 postgresql_databases name all mysql_databases name all using a standalone backup script most popular distributions include scripts like automysqlbackup 2 or autopostgresqlbackup 3 those scripts will usually save a daily dump of all databases to a folder like var lib automysqlbackup by running this script before your backup and including the dump folder in your source directories you get a timely backup of your database for borgmatic you can use pre backup hooks to run the database dump script commands before action when create run usr sbin autopostgresqlbackup have any other questions email us references borgmatic database backup hooks automysqlbackup autopostgresqlbackup
|