Backup Configuration Reference: Difference between revisions

From Sympl Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{Stub}}
Sympl includes a service to take and manage local [[backups]] on your server, using the flexible [[backup2l]] software, which is used due to it's simplicity and flexibility.
==Configuration Reference==
 
As with any other backups, care should be taken to ensure they are separate from the local machine to protect them from physical problems with the server, so synchronising them to another server on another network, or having a second set of third party backups is recommended.<blockquote>For information on using backup2l and recovering backups, see ''[[Using backup2l]].''</blockquote>
 
== Configuration of backup2l ==
The configuration for [[backup2l]] is built from the configuration snippets in <code>/etc/sympl/backup.d/conf.d/</code>, and covers the directories to be backed up, the destination they are stored in, and the maximum number of backups to keep.
{| class="wikitable"
!Directory Backed Up
!Contains
|-
|<code>/etc/</code>
|System configuration.
|-
|<code>/usr/local/</code>
|Local configuration.
|-
|<code>/root/</code>
|<code>root</code> users home directory.
|-
|<code>/srv/</code>
|Sympl domains.
|-
|<code>/home/</code>
|Other users home directories, including the <code>sympl</code> user.
|-
|<code>/var/mail/</code>
|Current email spool.
|-
|<code>/var/lib/</code>
|System libraries and data, including MySQL databases.
|-
|<code>/var/spool/cron/</code>
|User crontab files.
|-
|<code>/var/backups/mysql/</code>
|MySQL database dumps.
|}
Note that if you make any changes to the configuration snippets, you will need to update the configuration by running <code>cd /etc/sympl/backup.d ; sudo make</code> for them to take effect.
 
=== Pre and Post Backup Tasks ===
Sympl also has [[backup2l]] configured to run a number of tasks before and after the backups are run, specifically checks to ensure there is sufficient space to complete a backup and taking a new dump of all the databases using <code>[[sympl-sqldump]]</code>.
 
== Configuration Reference ==
<section begin=config />
<section begin=config />
{| class="wikitable sortable"
{| class="wikitable sortable"
|+
!File or Directory
!File or Directory
!Used For
!Used For
!More
!More
|}<section end=config /><blockquote>See also [https://wiki.sympl.host/view/Configuration_Reference ''Configuration Reference''] for other configuration files.</blockquote>
|-
|<code>/etc/sympl/backup.d/</code>
|Contains the backup configuration and support scripts.
|[[Backup Configuration Reference#Top|More...]]
|-
|<code>/etc/sympl/backup.d/conf.d/</code>
|Contains the <code>backup2l</code> configuration files.
|[[Backup Configuration Reference#Configuration of backup2l|More...]]
|-
|<code>/etc/sympl/backup.d/pre-backup.d/</code>
|Contains scripts which are run before the backup.
|[[Backup Configuration Reference#Pre and Post Backup Tasks|More...]]
|-
|<code>/etc/sympl/backup.d/post-backup.d/</code>
|Contains scripts which are run after the backup has completed.
|[[Backup Configuration Reference#Top|More...]]
|}
<section end=config /><blockquote>See also [https://wiki.sympl.host/view/Configuration_Reference ''Configuration Reference''] for other configuration files.</blockquote>
[[Category:Reference]]
[[Category:Reference]]
[[Category:Backup]]
[[Category:Backup]]

Latest revision as of 15:43, 19 July 2019

Sympl includes a service to take and manage local backups on your server, using the flexible backup2l software, which is used due to it's simplicity and flexibility.

As with any other backups, care should be taken to ensure they are separate from the local machine to protect them from physical problems with the server, so synchronising them to another server on another network, or having a second set of third party backups is recommended.

For information on using backup2l and recovering backups, see Using backup2l.

Configuration of backup2l

The configuration for backup2l is built from the configuration snippets in /etc/sympl/backup.d/conf.d/, and covers the directories to be backed up, the destination they are stored in, and the maximum number of backups to keep.

Directory Backed Up Contains
/etc/ System configuration.
/usr/local/ Local configuration.
/root/ root users home directory.
/srv/ Sympl domains.
/home/ Other users home directories, including the sympl user.
/var/mail/ Current email spool.
/var/lib/ System libraries and data, including MySQL databases.
/var/spool/cron/ User crontab files.
/var/backups/mysql/ MySQL database dumps.

Note that if you make any changes to the configuration snippets, you will need to update the configuration by running cd /etc/sympl/backup.d ; sudo make for them to take effect.

Pre and Post Backup Tasks

Sympl also has backup2l configured to run a number of tasks before and after the backups are run, specifically checks to ensure there is sufficient space to complete a backup and taking a new dump of all the databases using sympl-sqldump.

Configuration Reference

File or Directory Used For More
/etc/sympl/backup.d/ Contains the backup configuration and support scripts. More...
/etc/sympl/backup.d/conf.d/ Contains the backup2l configuration files. More...
/etc/sympl/backup.d/pre-backup.d/ Contains scripts which are run before the backup. More...
/etc/sympl/backup.d/post-backup.d/ Contains scripts which are run after the backup has completed. More...

See also Configuration Reference for other configuration files.