backup your sensitive data with backup- manager - Nicolas FUNKE

"mark" for the two backup types that I will describe below. * Differential backup: ... the official website http://www.backup-manager.org/download/ then extract it.
24KB taille 1 téléchargements 369 vues
Training course 2007

backuping in a Linux environment with Backup-manager

Training course 2007

BACKUP YOUR SENSITIVE DATA WITH BACKUPMANAGER Nicolas FUNKE PS2 ID : 45722

This document represents my internships technical report. I worked for the Biarritz's Town Hall during 3 and a half months this year in the City of Biarritz where I was able to apply my theorical knowledge on a lot of networking projects but I also worked a big backuping project on a linux server.

FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

Index 1.Theory of backup...............................................................................................................................3 1.1.Why is backuping so important?.............................................................................................. 3 1.2. The backup method selection.................................................................................................. 3 1.3.The backup methodology...........................................................................................................4 1.4.One process, two ways..............................................................................................................4 2.Backuping with backup-manager ..................................................................................................... 5 2.1.Introducing backup-manager ................................................................................................... 5 2.2.Backup-manager configuration.................................................................................................5 2.2.1.Installation........................................................................................................................5 2.2.2.Configuration................................................................................................................... 6 2.3.Backup simulation..................................................................................................................... 8 3.Conclusion......................................................................................................................................... 8 4.Appendices........................................................................................................................................ 9

FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

1 .Theory of backup Backup should be an essential part of your computing experience for important business dealings. The backup is now a necessity for companies. Today, the need for a sound data protection methodology is even more important because hardware failure is no longer the most common scenario to recover from. Due to a considerable overlap in technology, backups and backup systems are frequently confused with archives and fault-tolerants systems. Backup systems differ from fault-tolerant systems in the sense that backup systems assume that a fault will cause a data loss event and fault-tolerant systems assume a fault will not.

1.1.Why is backuping so important? The purpose of the backup is obvious: - The ability to restore a system in a full working state after any incident on a storage medium (loss of an hard disk or magnetic tape, for example). - The ability to restore files that have been accidentally deleted by a user, or find the original file that would have an unwanted modification.

1.2. The backup method selection Any backup strategy starts with a concept of a data repository. Several methods exist, we have to make a choice by looking these different criteria: * The storage capacity of the backup media * The speed of the backup * The reliability of support * The ability to restore data easily * The cost of setting up such a system There are two types of data. Recoverable data (operating systems, programs you can restore with the installation disk) and critical data (users data, databases etc.) you understand that the data we are interested in to backup is what I call the critical data.

FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

1.3.The backup methodology * Full backup: The full backup will, as its name suggests it, make a full backup without considering the last modified date. All files will be copied, and the backup could be used as a "mark" for the two backup types that I will describe below.

* Differential backup: This backup will copy all files created or modified since the last full backup. It is based on the last full backup. Its advantage is that a restore involves recovering only the last full backup and then overlaying it with the last differential backup.

* Incremental Backup: The incremental backup will copy all files that have been created or changed since the last backup regardless of the backup type (full, differential, incremental). The downside of this method is that you will have to deal with a long series of incrementals and you will have high storage requirements. 1.4.One process, two ways Indeed we have to differentiate two different needs. The client-data will not be the same as the server-data. For servers, the backup methodology is usually more stringent and more complex. A server cannot be down as long as an employees computer, because the server centralize the data and the services. The client computer is just a tool, the user can use any computer to work but we need to be sure his data is safe too.

FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

2 .Backuping with backup-manager

2.1.Introducing backup-manager Backup Manager is designed to be as easy to use as possible and designed to help you make daily archives of your file system. There are several methods of backup: Tarballs, Tarballs incremental, dumps musql, SVN dumps. You can also write your own customized command line to launch an external program. Backup-manager can also upload your archives on a FTP or another server using FTP, SSH protocols or even RSYNC! It's possible to burn data onto a CD or DVD. We consider in this article that the machine on which we operate is a server on which employees perform daily changes on the data that is available to the entire society.

2.2.Backup-manager configuration

2.2.1.Installation With Ubuntu's APT: Backup-manager is available in the universe repository. To install it type: $ sudo apt-get install backup-manager With the sources: You need these two dependencies: gettext and perl. Once installed you will be able compile without any problem, download the latest version on the official website http://www.backup-manager.org/download/ then extract it.

$ tar xzf backup-manager-0.6.2.tar.gz $ cd backup-manager-0.6.2 $ sudo make install

FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

Using the supplied configuration file: sudo cp /usr/share/backup-manager/backup-manager.conf.tpl /etc/backupmanager.conf During installation, you are asked a few parameters. Once the installation ends, backup-manager is already set to make backups. They will be daily, complete each 5 days and the form of compressed archives *. tar.gz. This is not what we seek for our companies need. In this article I will configure backup to retrieve sensitive data from the server and transfer it to a storage server through a secured SSH tunel .

2.2.2.Configuration During my internship, my mission was to ensure that the server's data was safe. It was an Linux Ubuntu 6.06 server. We need that this backup: • Make a full backup every 7 days . • Make Incremental backups every day. • Upload data to another server securely. The default configuration file is /etc/backup-manager.conf. Just edit it with any text editor. We choose the folder where backups will be stored with the following line: export BM_REPOSITORY_ROOT="/sauvegarde" For security reasons we will only allow a user or group to access the backuped data. export BM_REPOSITORY_SECURE="true" Only members of the backup group and/or backup users will be able to read, write the backuped data. The folder's permission is at 770 and the files are at 660. export BM_REPOSITORY_USER="backup-manager" export BM_REPOSITORY_GROUP="backup-manager" export BM_REPOSITORY_CHMOD="770" export BM_ARCHIVE_CHMOD="660" FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

The archives will be deleted after 7 days, we choose to tarball-incremental backup method. export BM_ARCHIVE_TTL="7" export BM_ARCHIVE_METHOD="tarball-incremental" The home folders of each users on the server will be saved every day. A 'Master' tarball, generated each first day of the week (Monday). export BM_TARBALL_DIRECTORIES="/home/" export BM_TARBALLINC_MASTERDATETYPE="weekly" export BM_TARBALLINC_MASTERDATEVALUE="1"

We are now entering in the networking part, we need to export data to another server securely. We will use the SCP tool. We define scp as the upload method, then we define the host on which we connect (10.1.2.6), beware that the user have access to the file, backup-manager here. Then we specify the location of encryption keys of the user. The location on the remote server is also specified, we use the /var/images/ directory. export BM_UPLOAD_METHOD="scp" export BM_UPLOAD_HOSTS="10.1.2.6" export BM_UPLOAD_SSH_USER="backup-manager" export BM_UPLOAD_SSH_KEY="/home/backup-manager/.ssh/id_dsa" export BM_UPLOAD_SSH_DESTINATION="/var/images" We are now done with the configuration. Our server exports therefore its data every day, with a full backup every 7 days, in a secure SSH tunel. We have respected our objectives.

FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

2.3.Backup simulation Run Backup-manager as root. Check that your files have been backuped. Your backup system is now working! # backup-manager

3 .Conclusion Backup-manager & Cron are now handling your backup system. Backups are essential in business, and it's unfortunately often after the loss of data that companies put such a system in place. I would like to thank the team I worked with in Biarritz who supported me and who involved me in a lot of criticals projects for the Townhall.

FUNKE Nicolas ID:45722

Training course 2007

backuping in a Linux environment with Backup-manager

4 .Appendices The official documentation on the backup-manager website was very helpfull on this project. http://www.backup-manager.org/documentation/user-guide-stable/

FUNKE Nicolas ID:45722