Backup of whole Database

AnBad's profile image AnBad posted 5 years ago in General Permalink

Hello, good morning,

what is the simplest way to make an backup of an whole mariaDB-Database?

I was hoping HeidiSQL running in Win10Pro is providing an easy way to do this, cause I dont have any expirience with Managing a databases what so ever.

How to do a backup? And of course, how to restore it?

Is there anywhere a stepbystep tutorial? :-)

I Need this, because I have to upgrade my Raspbian operating System and my FHEM.

Kind regards!!

Michael

ansgar's profile image ansgar posted 5 years ago Permalink

Of course, this is one of Heidi's most used features I suppose. Just rightclick a database, then click "Export database as SQL". In the following dialog you have a few options where you can play with. For a full backup I recommend activating

  • create database
  • create tables
  • data: insert
  • max insert size: 1024K
  • output: single .sql file

There is an online help for that dialog, and it is just a click away, if you click on the question mark in the title bar of that dialog. It will take you to that verbose help section.

ansgar's profile image ansgar posted 5 years ago Permalink

Restoring such an .sql file is easy: just click File > "Run SQL file", and select your backup file (and this is important: chose the right encoding, eg "UTF-8"). The rest is just to sit and wait for the restore window to finish.

AnBad's profile image AnBad posted 5 years ago Permalink

Thank you very much! It worked very well!!

  1. Export via: Tools/database Export
  2. Import via: file/SQL-file load

Please login to leave a reply, or register at first.