Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • B Bacula Community
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Bacula Community Edition
  • Bacula Community
  • Wiki
  • Application Specific Backups

Application Specific Backups · Changes

Page history
Create Application Specific Backups authored Aug 23, 2022 by Administrator's avatar Administrator
Hide whitespace changes
Inline Side-by-side
Application-Specific-Backups.md 0 → 100644
View page @ 66eee009
Normally, Bacula backs up a file simply by reading its contents and
various attributes. In the case of certain applications, however, this
will not produce a consistent snapshot that can be used to bring the
application back up later. The most common example of this is live
databases, where the files on disk may be in an intermediate state, such
as MySQL, PostgreSQL, or MS Exchange.
This section is intended to try and gather up various tips and tricks on
how to force the data on disk into a safe consistent state, or extract
the data out into a snapshot that can later be restored.
# General Techniques
These are methods that can be applied to a wide range of tricky
applications to back up. They may need some tweaking, but hopefully they
will at least point you in a useful direction.
## Linux LVM Snapshots
If you have Linux configured with LVM, it is possible to take a snapshot
of a filesystem, and back up that static snapshot instead of the live
one. This allows you to shut down the application for only a few moments
while the LVM snapshot is created, let bacula take as long as it needs
to back up the snapshot data, and then destroy the snapshot.
Before going any further, you should be familiar with Linux LVM, and LVM
in general. If not, a good resource is the Linux LVM HOWTO at
<http://www.tldp.org/HOWTO/LVM-HOWTO/>
The first pass is a run before script that must a) shut down the
offending application and b) create and mount a snapshot of the
filesystem containing the volatile data.
#!/bin/sh
echo "Shutting down lively database `date`"
/etc/init.d/lively stop
modprobe dm-snapshot
sleep 3
lvm lvcreate --size 50G --snapshot --name uno_snap /dev/VG/LV_uno
sleep 3
echo "Restarting lively database `date`"
/etc/init.d/lively start
mount -o ro /dev/VG/uno_snap /uno_snap
exit 0
The static snapshot is now ready to be backed up from the /uno_snap
mountpoint. Your fileset should include this directory. Once the backup
is done, you will need to clean up the snapshot and reclaim the used
disk space.
#!/bin/sh
echo "Destroying /uno snapshot"
umount /uno_snap
lvm lvremove -f /dev/VG/uno_snap
exit 0
One caveat to note is that when you restore the data, Bacula will
restore it to the snapshot location that it was backed up from. You will
most likely need to manually move the data back to where the application
is expecting it before you try to restart it.
The Bacula `estimate` command is not useful when you backup snapshots :
it reports always 0 as the snapshot is only created at the beginning of
the backup job.
# Applications
These are scripts and configs aimed directly at a specific application.
These contributed solutions offer methods for backup. However, some
could also use either additional information on how to perform a restore
as well, or links to other pages with more complete information.
## Contributions
- [PostgreSQL](/Application Specific Backups/PostgreSQL)
- [MySQL](/Application Specific Backups/MySQL)
- [Outlook (Local PST
Files)](/Application Specific Backups/Outlook (Local PST Files))
- [Subversion
repositories](/Application Specific Backups/Subversion repositories)
- [Subversion repositories (using
python)](/Application Specific Backups/subversion_repositories_python)
- [Microsoft SQL
Server](/Application Specific Backups/Microsoft SQL Server)
- [Oracle](/Application Specific Backups/Oracle)
- [Oracle RDBMS](/Application Specific Backups/Oracle RDBMS)
- [Exchange Server](/Application Specific Backups/Exchange Server)
- [OpenLDAP](/Application Specific Backups/OpenLDAP)
- [389 Directory Server](/Application Specific Backups/389) (aka
Fedora Directory Server or Redhat Directory Server)
- [Microsoft IIS](/Application Specific Backups/Microsoft IIS)
- [Interbase/Firebird](/Application Specific Backups/FirebirdRDBMS)
- [MediaWiki](/Application Specific Backups/MediaWiki)
- [RRDtool](/Application Specific Backups/RRDtool)
- [Vmware Server 2.x (and
1.x)](/Application Specific Backups/vmwareserver#vmware_server_2)
- [TRAC](/Application Specific backups/TRAC)
- [VMware consolidated backup (ESXi 4.0 /
4.1)](/Application Specific backups/Poor man VMware consolidated backup)
- [Axigen Mail server](/Application Specific backups/Axigen)
- [Virtualbox on linux
hosts](/Application Specific backups/Virtualbox on linux hosts)
## Work in progress
## Requested specific backup solutions
- CVS
- FreeBSD + UFS2 Snapshots
- FreeBSD + ZFS Snapshots
Clone repository
  • 3rd Party Addons
  • 3rd_party_addons.txt
  • Application Specific Backups
  • Bacula Manual
  • Commercial Support
  • Handling mass Email Reports
  • Hardware Results
  • Hints & Tips
  • Sample Configs
  • application_specific_backups.txt
  • application_specific_backups
    • 389
    • axigen
    • exchange_server
    • firebirdrdbms
    • mediawiki
View All Pages