2013-06-12 19:55:16 +02:00
|
|
|
obackup
|
|
|
|
=======
|
|
|
|
|
2013-06-13 19:14:21 +02:00
|
|
|
A file & database backup script tailored for multiple virtualhost backups locally or remotely via ssh.
|
|
|
|
Yet it actually works for a lot of backup tasks.
|
2013-06-12 20:25:25 +02:00
|
|
|
|
2013-06-12 21:08:07 +02:00
|
|
|
## About
|
|
|
|
|
2013-06-12 20:25:25 +02:00
|
|
|
OBackup is designed from ground to make the backup process as reliable as possible.
|
|
|
|
It divides the whole backup process into tasks, allowing each task to execute for a certain amount of time.
|
|
|
|
If a task doesn't finish in time, it's stopped and the next task is processed.
|
|
|
|
Before a task gets stopped, a first warning message is generated telling the task takes too long.
|
2013-06-12 21:08:07 +02:00
|
|
|
Every action gets logged, and at the end of the backup process, if there was a warning,
|
|
|
|
a stopped task or an error an alert email will be sent.
|
|
|
|
|
2013-06-13 19:14:21 +02:00
|
|
|
OBackup can enumerate and backup all MariaDB / MySQL databases present on a server
|
2013-06-13 08:24:25 +02:00
|
|
|
It can also enumarate all subdirectories of a given path and process them as separate tasks (usefull for multiple vhosts).
|
|
|
|
It will do several checks before launching a backup like execution checks, dryruns,
|
|
|
|
checking backup size and available local disk space.
|
2013-06-12 21:08:07 +02:00
|
|
|
|
|
|
|
Obackup will work well to backup to a snapshot aware filesystem like ZFS or btrfs.
|
|
|
|
In case you don't work with one of these, it may also rotate backups for you.
|
|
|
|
|
|
|
|
As of today, obackup has been tested successfully on RHEL / CentOS 5, CentOS 6, Debian 6.0.7 and Linux Mint 14
|
2013-06-13 08:24:25 +02:00
|
|
|
but should basically run on your favorite linux flavor. It relies on well known programs like rsync, ssh, mysqldump along
|
2013-06-12 21:08:07 +02:00
|
|
|
with other great GNU coreutils.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
You can download the latest obackup script from authors website.
|
|
|
|
You may also clone this git which will maybe have some recent bugfixes.
|
|
|
|
|
2013-06-13 08:24:25 +02:00
|
|
|
$ git clone git://github.com/deajan/obackup.git
|
|
|
|
$ chmod +x ./obackup.sh
|
2013-06-12 21:08:07 +02:00
|
|
|
|
|
|
|
Once you have grabbed a copy of Obackup, just edit it with your favorite text editor to setup your environment
|
2013-06-13 08:24:25 +02:00
|
|
|
and you're ready to run. A detailled documentation can be found in the CONFIG.TXT file.
|
2013-06-12 21:08:07 +02:00
|
|
|
|
|
|
|
You can run multiple instances of obackup scripts with different backup environments. Just copy the script to another
|
|
|
|
filename, edit it's environment and you're ready to run concurrently.
|
|
|
|
|
2013-06-13 19:14:21 +02:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
MariaDB / MySQL backups are consistent because dumps are done with the --single-transaction option.
|
|
|
|
File backups can be done directly of the data won't change while backing up but a snapshot of the actual data to backup
|
|
|
|
is preferable as it will stay consistent (LVM, zfs or btrfs snapshots will do fine).
|
|
|
|
|
|
|
|
$ ./obackup.sh TASKNAME --dry
|
|
|
|
$ ./obackup.sh TASKNAME
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 21:08:07 +02:00
|
|
|
## Author
|
|
|
|
|
|
|
|
Orsiris "Ozy" de Jong.
|
2013-06-12 20:25:25 +02:00
|
|
|
|
2013-06-12 21:08:07 +02:00
|
|
|
|