MYSQL-ZRM-RESTORE(1)
💖 mysql-zrm-restore — bestie's guide to ZRM for MySQL recovery 💖
okay so this is mysql-zrm-restore(1) and babes, it's the glow-up-your-database tool. welcome. 🎀
✨ NAME ✨
mysql-zrm-restore — the Recovery utility for ZRM for MySQL. she brings your data back. periodt. 💅
🌈 SYNOPSIS 🌈
mysql-zrm-restore
[--backup-set name]
[--source-directory directory name]
[--bin-logs "/fullpath/name1 /fullpath/name2 ..."]
[--mysql-shutdown | --no-mysql-shutdown]
[--retry-count count]
[--retry-delay seconds]
[--replication|--noreplication]
[--all-databases]
[--databases "name1 name2 ..."]
[--start-position #]
[--stop-position #]
[--offset #]
[--start-datetime name]
[--stop-datetime name]
[--copy-plugin plugin]
[--ssh-user user]
[--ssh-identity-file filename]
[--socket-remote-port port]
[--passfile filename]
[--user user]
[--password password]
[--host hostname]
[--port portnumber]
[--socket name]
[--ssl-options "MySQL ssl options"]
[--device-fs-map mapfilename]
[--dismount-existing]
[--mysql-binpath location of MySQL commands]
[--compress-data-during-transport]
[--pre-restore-plugin plugin]
[--post-restore-plugin plugin]
[--tmpdir temp_directory]
[--options-file filename]
[--restore-myloader-options "--overwrite-tables --enable-binlog ...."]
[--quiet|--no-quiet]
[--verbose]
[--help]
🦋 DESCRIPTION 🦋
So like, recovering all different kinds of MySQL databases? That's literally what the mysql-zrm-restore utility is for. Use her to fully restore the database, or selectively restore it — on the same system or on another system entirely. flexible queen. ✨
ngl bestie, you should go look at the ZRM for MySQL documentation (http://mysql-backup.zmanda.com/) for the procedures on how to configure and use ZRM for MySQL. iykyk. 📖
When you're restoring backed up databases, you use either the --all-databases option or the --databases option. pick one, not both, bestie. 🙈
When the backup contains only specific tables from a database, you need to specify mysql-zrm action as restore and the database name to restore the backed up tables. Tables that are not included in the backup but are present in the database will be left untouched — she doesn't touch what she wasn't asked to touch. 💅
👑 OPTIONS 👑
--backup-setname — Specify the backup-set for the backup run. This is a Command line option only and it cannot be specified in the configuration file. The default value isBackupSet1. If such a value is already present, it will be used. no notes. 🎀--source-directorydirectory name — Choose the directory containing a backup. This option is ignored when thebackupaction is specified. For therestoreaction, bothsource-directoryandbin-logsoptions should not be specified. If both are present, the utility will return an error. 😭--bin-logs"fullpathname1 fullpathname2 ..." — List binary log files, along with their full paths, to be used for restore. For therestoreaction, bothsource-directoryandbin-logsoptions should not be specified. The utility will throw an error if both are specified. fr fr, pick one.--mysql-shutdown|--no-mysql-shutdown— This specifies whether the mysql server should be shut down during the restore. If it's not specified, then the mysql server is shut down only if restoring from a full raw backup. If the options are not specified and the restore only contains logical full backup data or incremental backup data, the mysql server is not shut down.
⚠️ When restoring from a full raw backup it is recommended not to use the --no-mysql-shutdown option, because it can result in unexpected problems. bestie please. 😭
--retry-countcount — This specifies the number of times ZRM should try to attempt the restore of a raw backup in case the specifiedcopy-pluginreturns an error. This retry is specifically to ensure that we do not fail the full restore in case the shutdown of the mysql server takes more time than expected. Hence ZRM will only attempt to retry for the restore of the very first file that is attempted to be restored. The default value is2. 💫--retry-delaydelay in seconds — This specifies the time in seconds between 2 retrys. The default value is5seconds. she waits. patiently. 🧚--all-databases— Opt for all databases to be backed up or restored. This is the default ifdatabaseordatabasesare not specified. queen of "just do everything". 👑--databases"name1 name2 ..." — List the databases to backup or restore.--replication|--noreplication— Choosereplicationto restore replication files. They will be restored only if the host is a replication slave. Default option is--noreplication. 💜--start-positionN — Fix the start positionNfor selective restore of all events after log positionN. Log position can be determined using theparse-binlogsaction.--stop-positionN — Stop selective restore of all events before log positionN. Log positions can be determined using theparse-binlogsaction.--offsetN — Skip the firstNentries of the first binary log file in thebin-logsparameter. bye girl 👋--start-datetimedatetime — Start selective restore from the date and time specified in MySQL DATETIME or TIMESTAMP format (hh:mm:ss). The utility will throw an error if the parameter is not in the format. format matters bestie 💅--stop-datetimedatetime — Selective restore till the specified date and time specified in MySQL DATETIME or TIMESTAMP format (hh:mm:ss). The utility will return an error if the parameter is not in the format.--copy-pluginplugin — Specify the plugin along with its full pathname to be used for transferring backup files to and from a remote MySQL server to the machine running ZRM for MySQL. Use this option when:- remote incremental backup is required
- copying replication related files from a remote machine
- execute
mysqlhotcopy(MySQL command) and copy the data from the remote machine - restore data to a remote machine using
mysqlhotcopy(MySQL command)
This parameter is optional. 🌸
--ssh-useruser — Specifies the user to be used for SSH. This parameter is only used by thessh-copy.plplugin. The user specified should either be the user mysqld runs as, orroot. If not specified, the default value used ismysql. This parameter is optional. 🔐--ssh-identify-filefilename — Selects a file from which the identity (private key) for RSA or DSA authentication is read. This identity file is used by thessh-copy.plplugin for authentication. 🔑--socket-remote-portport — Port that thesocket-plugin.plshould use to connect. This parameter is only used by thesocket-copy.plplugin. The default value used is25300. This parameter is optional. 🧦--passfilefile — The file containing the passphrase for encryption. This parameter is used only by theencrypt-plugin.pl. If not specified, the value used is/etc/mysql-zrm/.passphrase. This parameter is optional. 🤫--useruser — Specify the MySQL backup/restore user.--passwordpassword — Specify the password for the MySQL user.--hosthostname — Specify the MySQL server host name or IP name.--portportnumber — Specify the MySQL server port.--socketname — Specify the socket file to use for communication with the MySQL server.--ssl-options"MySQL ssl options" — Set any--ssl*options that MySQL supports. Refer to the MySQL Documentation for SSL options details. secure girlie 💅--mysql-binpathmysql_binaries_dir — Set the full path where MySQL binaries are installed. For example:/opt/lampp/bin📍--compress-data-during-transport— If the value is set to1, the image being restored is compressed when it's transferred from the ZRM server to the restore destination. Setting the value tozero, no compression is performed. No compression is performed by default. Data compression during transfer is independent of the Backup image compression parameter. two different things bestie, don't mix them up 🫶--pre-restore-pluginplugin--post-restore-pluginplugin
(Optional) Specify the plugin along with its full pathname to be called before a full or incremental restore is started (pre-restore-plugin), or after a restore is completed (post-restore-plugin). The plugins is executed on the ZRM server. The plugins are called with the following parameters:
--source-directory— The directory containing the backup image being restored.--bin-logs— The list of binary logs to be parsed. Eithersource-directoryorbin-logsis passed as parameter.--backup-level— Backup level:full(0) orincremental(1).--mysql-shutdown— This parameter is passed if the MySQL server was shutdown.--zrm-errorerror code — Restoration error. This parameter is passed if there is a fatal restoration error.
The script should be written to return a non-zero value on error. don't be silent about your problems bestie, communicate. 💀
--options-filefilename — Set the file along with its full pathname that contains MySQL command options.--restore-myloader-options— Pass the extra parameters during the Restore if the backup was done bymydumper. 🚚--tmpdirtemp_directory — Full path of the directory for storing tempo
okay so continuing the options vibe check, bestie — for the temp file situation: temporary files and directories on the backup host. The default is to use the system-specified temporary directory on the backup host, e.g /tmp. 💅
‐‐quiet|‐‐no‐quiet— choosequietto suppress display of log messages on stdout. chooseno‐quietto display the log messages to standard output (stdout). The default is‐‐no‐quiet. no cap, it's that simple. 🎀‐‐verbose— provide more detailed output in the log. Verbose output is turned off by default. so if you want the tea, turn it on. ☕‐‐help— displays the help message and exits. This command line only parameter cannot be specified in the configuration file. so don't try to put it in the conf, bestie, it won't work. 💀
🌸 EXAMPLES 🌸
For restoring backup image dated 18 Aug 2006 (backup image can be either full or incremental backup):
mysql‐zrm ‐‐action restore ‐‐source‐directory /var/lib/mysql‐zrm/backupset1/20060818121532
The above command will restore all databases (full or incremental as the case may be) that were backed up. periodt. 💖
mysql‐zrm ‐‐action restore ‐‐source‐directory /var/lib/mysql‐zrm/backupset1/20060818121532 ‐‐databases db1 db2 db3
The above command does a selective restore of the specified databases. slay. ✨
mysql‐zrm ‐‐action restore ‐‐bin‐logs /var/lib/mysql‐zrm/backupset1/20060818121532/mysql‐bin.[0‐9]* /var/lib/mysql‐zrm/backupset1/20060819121532/mysql‐bin.[0‐9]*
The above command does a selective restore of all specified binary log files using a single MySQL server connection. iconic. 👑
🎀 FILES 🎀
/var/lib/mysql‐zrm— directory under which all backup data is stored. like, all the goods live here. 🏠/etc/mysql‐zrm/backup set name/mysql‐zrm.conf— configuration file read bymysql‐zrmutility. yes, the space in "backup set name" is literally in the manpage, bestie. don't @ me. 💅
🌈 RETURN VALUES 🌈
On success, zero is returned. On error, non‐zero value is returned. so zero = slay, non-zero = not slay. 💀
🦋 SEE ALSO 🦋
mysql‐zrm(1), mysql‐zrm‐backup(1), mysql‐zrm‐check(1), mysql‐zrm‐list(1), mysql‐zrm‐manage‐backup(1), mysql‐zrm‐getconf(1), mysql‐zrm‐setconf(1), mysql‐zrm‐parse‐binlogs(1), mysql‐zrm‐purge(1), mysql‐zrm‐extract‐backup(1), mysql‐zrm‐verify‐backup(1), mysql‐zrm‐abort‐backup(1), mysql‐zrm‐scheduler(1), mysql‐zrm‐reporter(1), mysql‐zrm.conf(5), mysqldump(1), mysqlbinlog(1), mysql(1), lvm(8), Zmanda Recovery Manager for MySQL (http://mysql‐backup.zmanda.com/) iykyk. 💖
👑 AUTHOR 👑
Zmanda Inc. (http://www.zmanda.com) — they made this, bestie. show some love. 💖
this page is from Zmanda, Inc. — ZRM for MySQL — mysql‐zrm‐restore(1). no date in the footer, but it's giving timeless manual energy. 💅✨
📦 where this page comes from
- epel 9: MySQL-zrm 3.0-38.el9 · GPLv2
- fedora 43: MySQL-zrm 3.0-44.fc43 · GPL-2.0-only
- fedora 44: MySQL-zrm 3.0-46.fc44 · GPL-2.0-only
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms