Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Moodle Security

You're reading from   Moodle Security Learn how to install and configure Moodle in the most secure way possible

Arrow left icon
Product type Paperback
Published in Feb 2011
Publisher
ISBN-13 9781849512640
Length 204 pages
Edition Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Site backup


We already mentioned three crucial elements that must be backed up in order to have a safeguard against site crashes.

Database

Database backup consists of exporting database structure (tables) and data. Export can be in some proprietary format or as a standard SQL script. Since our focus was on MySQL database we will explain the process for that Relational Database Management System (RDBMS). If you happen to use another RDBMS consult the vendor documentation for the appropriate export procedure.

MySQL comes with variety of command-line tools mostly for administrative purposes. The tool for exporting database is called mysqldump. This is a recommended template command line for exporting a single database from MySQL assuming that the command is being executed on the server where the database is running.

mysqldump -u<username> -p<password> --opt --result-file=<output file> <database name>

Using our values for the Linux, setup export would look like this...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image