Using the backup-manager Linux utility

Here's a quick rundown of a simple backup-manager configuration.

In addition to the basic tarballs, I set it up to backup the mysql database.

I did not automate the backup process. I will use the configuration to backup stuff manually on a USB drive.

I am also not using the upload functionality of backup-manager.

These should be relatively easy to set up once you try out the manual process.

Installation

Installing backup-manager with apt-get is easy:
sudo apt-get update
sudo apt-get install backup-manager

It will ask for some of the configuration. Don't worry about that now, we will change the configuration later.

Disable unnecessary cron job (optional)

With the following commands I found all the backup-manager files strewn across the system:
updatedb
locate backup-manager

From there, I could see that backup-manager installed a cron job:
/etc/cron.monthly/backup-manager-clean-upload-db

As I am not using the upload jobs, I disabled that cron job. This should not be necessary.
sudo chmod -x /etc/cron.monthly/backup-manager-clean-upload-db

Configuration

Now to configure backup-manager, the best way to start is
sudo dpkg-reconfigure backup-manager

The interactive setup will help you do the basic settings.

For special settings like mysql backup you should edit the config file directly:
sudo nano /etc/backup-manager.conf

I made the following changes to my files:

export BM_REPOSITORY_ROOT="/mnt/backupdisk/"
export BM_ARCHIVE_TTL="730"

export BM_ARCHIVE_METHOD="tarball mysql"
export BM_TARBALL_DIRECTORIES="/etc /home /root /boot"

export BM_MYSQL_ADMINPASS="my_secret_mysql_password"

This config will make a backup of all mysql databases as well as the listed tarball directories. The time to live is 730 days, which is 2 years. So all archives will be kept for 2 years.

Making the backup

I suggest you use screen if you are connected with an SSH terminal:
screen bash

Using screen allows you to disconnect and will not stop the job if your network goes down. If you get disconnected, the process will continue, and you can return to the old screen bu typing
screen -r

You can also get out from your screen process with ctrl-a, ctrl-d. And then return to it with
screen -r

Finally, we can run the backup:
sudo backup-manager --verbose

All done!

More information

For more information, the backup-manager readme file can be examined with:
cat /usr/share/doc/backup-manager/README.Debian

On you system it might be in another file. In that case, you can use the updatedb and locate commands to find it.

You can also inspect the user guide in a very unreadable format on the github repository.

 

Comments

Popular posts from this blog

How to install and play Curse of Monkey Island on Android

How to get rid of coil whine just by tweaking BIOS

How to fix the weird audio bug in Kingdom Come: Deliverance

How to find the ScummVM game folder on Android

How to fix the Anno 1404 out of memory error

Fix for Focusrite Scarlett blue screens on Windows 10