LDP/LDP/users/Jason-Evans/Linux-Complete-Backup-and-R.../Linux-Complete-Backup-and-R...

73 lines
3.7 KiB
Plaintext
Executable File

= How to Perform at Backup of a Simple LAMP Server.
Outline:
* What Do we need to back up?
** /home
** /etc
** /var/www
** MySQL/MariaDB
* How to we back it up?
** Network Storage and Cloud
** Physical Media
** Scripts
** Bakula
* How do we restore from backup?
* How do we automate the process?
** Crontabs
== Revision History
[cols="<,<,<,<",options="header",]
|==========================================================================================================================================================
|Revision |Date |Person |Note
|Revision 1.0 |2016-02-24 |Revised by: Jason Evans | Initial writing and compiling
|==========================================================================================================================================================
== Introduction
Losing data is no laughing matter. Disks fails, servers crash, and sometimes mistakes happen. How do we avoid catastrophic losses of data? We make backups! This guide is an attempt to show the Linux newbie how to back up a simple web server, but it's not limited to that. Using the techniques in this quide, you can back up your Linux desktop to a NAS or just your family photos to Dropbox. This guide is meant to be more than just a dry howto for a specific type of server. Linux is flexible and easy to adapt to a number of uses. Where you learn one skill, you can apply it to a thousand other issues.
== License Information
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
== Disclaimers
No liability for the contents of this documents can be accepted by the author, the http://www.tldp.org/[Linux Documentation Project] or anyone else. Use the concepts, examples and other content at your own risk. There may be errors and inaccuracies that may damage your system.
Proceed with caution, and, although errors are unlikely, the author take no responsibility for them.
All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark.
Naming of particular products or brands should not be seen as endorsements.
You are strongly recommended to take a backup of your system before major installation and backups at regular intervals. In addition, you are strongly recommended to use a sacrificial experimental computer when mucking with the material, especially the scripts, in this HOWTO.
== Credits
Thanks to Larisa Alekseeva for your guidance and help and to the Triangle Linux Users Group for helping me get started in Linux.
Thanks to http://www.charlescurley.com/[Charles Curley] for creating the original http://tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/index.html[Linux Complete Backup and Recovery HOWTO]
== Feedback
Feedback is most certainly welcome for this document. Without your corrections, suggestions and other input, this document wouldn't exist. Please send your additions, comments and criticisms to me at: jason.s.evans@gmail.com
== Translations
Volunteers are welcome.
== Overview
== Preparation
You will need a computer or server running CentOS or Ubuntu in a LAMP (Linux, Apache, MySQL, PHP) configuration. You may apply the strategies discussed to many other distributions such as Red Hat Enterprise Linux, Fedora, Debian, or one of their derivatives. This may be a physical server or a VM (virtual machine).
Note:
Do your normal backups on their regular schedule. This HOWTO is useless if you don't do that.
=== What do I need to back up?
There are three directories that absolutely must be backed up: `/home`, `/var/www`, and `/etc` as well as the MySQL database.