Docs / Manual restore (without SaintBackup)
Manual restore (without SaintBackup)
Files in the repository are standard mariabackup backups compressed as zip. If the license expires or the software will not open, you can still restore on your own.
An expired license does not lock backup files. Everything you need is in the Center's repository folder.
What you need
- The repository folder:
%ProgramData%\SaintBackup\center\storage\<agent-id>(Linux:/var/lib/saintbackup/center/storage/…). mariabackupwith the same major.minor as the source server.- Any zip extraction tool (Windows Explorer, 7-Zip,
unzip).
Fast path: use the prepared copy
The _prepared\full_NNNNN folder is already merged up to the latest incremental. Copy it somewhere else, then continue from the copy-back step.
Build from the zips
- Extract the most recent full backup before the point in time you need:
mkdir D:\restore\full tar -xf 20261108_0200_full_00400.zip -C D:\restore\full - Prepare the full backup:
mariabackup --prepare --target-dir=D:\restore\full - For each incremental, in strict numeric order, extract it and merge it in:
mkdir D:\restore\inc1 tar -xf 20261108_0230_inc_00401.zip -C D:\restore\inc1 mariabackup --prepare --target-dir=D:\restore\full --incremental-dir=D:\restore\inc1
Each command must end with the line completed OK!.
Copy into the datadir (copy-back)
Use this when restoring an entire server into a new or stopped MariaDB:
- Stop MariaDB and make sure the datadir is empty (rename the old datadir to keep it).
- Run:
mariabackup --copy-back --target-dir=D:\restore\full --datadir="C:\Program Files\MariaDB 11.4\data" - Linux:
sudo chown -R mysql:mysql /var/lib/mysql. - Start MariaDB.
Restore a single database
- Add the step
mariabackup --prepare --export --target-dir=D:\restore\full. - On the target server, create a new database and run the
CREATE TABLEstatements in_schema\<db>.sql(each statement is separated by a-- ;;--line). - For each InnoDB table:
ALTER TABLE `ten_bang` DISCARD TABLESPACE; -- copy ten_bang.ibd and ten_bang.cfg into the new database's folder in the datadir ALTER TABLE `ten_bang` IMPORT TABLESPACE; - MyISAM/Aria tables: copy
.frm/.MYD/.MYI(or.MAD/.MAI) into the database folder, then runFLUSH TABLES;