Table of Contents
The BackupPC module is an easy solution to make backups of network shared data (Windows shares/Samba, SSH, NFS) and to manage them with a web browser. This module is based on the free software 'BackupPC' from Craig Barratt http://backuppc.sf.net.
The BackupPC module allows:
For each client, to set up full and incremental backups, with a simple Web interface (see Section 6.2, “Basic clients configuration”).
For each back up, to browse and select the files to restore. You can restore files directly to the client or to an archive file (.tar or .zip) which contains the selected files (see Section 6.2.4, “Host status and restoration”).
Easily tweak some of the most important global backup parameters (see Section 6.4, “Useful global parameters”).
Quickly see the back up server' status in the 'Home -> Status -> Files backup' tab (see the screen shot above).
The BackupPC configuration's module is available from the main LRS screen. Click on an icon below the 'Files' column, to see this client configuration.
The configuration module's goal is to generate the configuration file for each host, which contains:
The file transfer to use.
The shared folders to backup.
The connexion parameters.
If a client has never been configured, you will have to confirm that you want the files backup module to take it into account.
BackupPC provides 5 transfer methods:
Windows (SMB): Windows shared folders (samba for Linux). Using shared folders is the easiest way to backup data on MS Windows computers, however it is insecure because the password must be saved in clear text on the server.
UNIX (NFS): Data is accessed from the local file system of NFS mounted shares.
Tar SSH: If you need a high level of security, choose SSH. SSH can also work with Windows or MacOS with little efforts. If you choose this backup method, you'll need a SSH service running on the backed-up host, and you'll need to install the SSH authentication key on the host in the 'root' account. The key can be downloaded on the same page. For a UNIX like target, you will have to add the key to /root/.ssh/authorized_keys2 file.
Distant backup (rsync). Requires rsync and SSH service installed on the client.
Distant backup (rsyncd). Requires a running rsyncd service on the client.
![]() | |
Microsoft Windows uses a locking system to tag the used files. It is impossible to overwrite a locked file. Thus it is useless to save the system directories from a
Microsoft Windows installation ( |
A list of available shared folders can be seen. You can also specify some extra paths in the text entry area. Note that with some Windows versions, shares whose names are longer than 12 characters will not be shown. In that case, you need to type the full share name in the text entry box.
For some transfer methods a login and a password are required to connect the shared resource.
The backup period defines the time between back ups. The back ups are divided in two categories; full (all the files are stored) and incremental (only the modifications since the last backup are stored).
The default values are typically set slightly less than an integer number of days (one full backup a week correspond to 6.97, one incremental backup each day to 0.97).
![]() | |
Setting '-1' as the full backup period, allows BackupPC to skip regular backups (launching manual backups is still available). |
After you click 'Apply', the BackupPC configuration file is generated and displayed with previous information, and the back up will be scheduled:
If you click on the 'Computer' tab, the back up status of the client is displayed. You may also start or stop backups, and browse or restore all backups.
If you click on a number (in the 'Backup#' column), you will start to browse the backup's contents. After selecting a few files or directories, you should be able to restore them with the 'Restore' button. Then, you may choose between 3 restoration methods:
Direct restore to the client's hard disk.
Download a .ZIP archive.
Download a .tar archive.
With some clients under MS Windows, LRS cannot see shared folders. You should check that:
The LRS is in the right Workgroup or Domain. Check in /etc/samba/smb.conf, that the Workgroup parameter is set to your network.
MS Windows simplified sharing should be disabled. Click Start, and then click My Computer. On the Tools menu, click Folder Options, and then click the View tab. In the Advanced Settings section, clear the "Use simple file sharing (Recommended)" check box. Click OK.
Shares with names more than 12 characters may not be seen in the list. You will have to type the name of such a share to add it to the backup list.
The firewall allows access to the shares.
The client can be seen from the server. You can run a "nmblookup client_name" on the LRS command line to check.
With MacOS X clients, check that mDNS is configured on the server. If you want to reach the client with its mDNS name, do not forget the ".local" suffix when declaring it in the LRS.
The global BackupPC configuration file is
/etc/backuppc/config.pl.
Important parameters can be modified with the web interface (see screen shot below):
When the daemons wakes up to launch new backups (see also $Conf{WakeupSchedule} below)
The number of simultaneous backups (see also $Conf{MaxBackups} below)
The number of full or incremental backups to keep (see also $Conf{FullKeepCnt} below)
The blackout hours (see also $Conf{BackoutPeriods} below)
The DHCP pools to find clients with a dynamic IP.

This variable contains the name of the BackupPC box:
$Conf{ServerHost} = 'lrs.localdomain';These variables contain the standard number of backups to store (respectively full and incremental).
$Conf{FullKeepCnt} = 1;
$Conf{IncrKeepCnt} = 6;These variables contain the minimal number of backups to keep (respectively full and incremental).
$Conf{FullKeepCntMin} = 1;
$Conf{IncrKeepCntMin} = 1;These variables contain the number of days to wait before deleting an old backup (respectively full and incremental). Nevertheless the 'FullKeepCntMin' and 'IncrKeepCntMin' numbers of backups are kept even if the date is over this period.
$Conf{FullAgeMax} = 60;
$Conf{IncrAgeMax} = 30;Times at which BackupPC wakes up, checks all the PCs, and schedules necessary backups.
$Conf{WakeupSchedule} = [22.5]; # Once per day at 10:30PM.
$Conf{WakeupSchedule} = [1..23]; # Every hours except midnight.
$Conf{WakeupSchedule} = [2,4,6,8,10,12,14,16,18,20,22];
# Every two hours.
Maximum number of pending link commands. New backups will only be started if there are no more than $Conf{MaxPendingCmds} plus $Conf{MaxBackups} number of pending link commands. 10 is a good value.
$Conf{MaxPendingCmds} = 10;Useful parameters for each host.
Name of the host share that is backed up when using SMB (MS Windows).
$Conf{SmbShareName} = 'c'; # backup 'c' share
$Conf{SmbShareName} = ['c', 'd']; # 'c' et 'd' sharesWhich host directories to backup when using tar transport.
$Conf{TarShareName} = '/'; # backup all
$Conf{TarShareName} = ['/home', '/src']; # only /home & /srcMinimum period in days between full backups and incremental backups.
-1: Don't do any regular backups on this machine. Manually requested back ups (via the CGI interface) are possible.
-2: Don't do any backups on this machine.
$Conf{FullPeriod} = 6.97; # Once per week.
$Conf{IncrPeriod} = 0.97; # Once per day.If a client is subject to blackout then no regular (non-manual) backups will be started during any of these periods.
$Conf{BlackoutPeriods} = [
{
hourBegin => 7.0,
hourEnd => 19.5,
weekDays => [1, 2, 3, 4, 5],
},
];
# specifies one blackout period from 7:00am to 7:30pm local
# time on Mon-Fri.Useful parameters for each share
What transport method to use to backup each host
"smb": backup and restore via smbclient and the SMB protocol. Easiest choice for MS Windows
"rsync": backup and restore via rsync (via rsh or ssh).
"rsyncd": backup and restre via rsync daemon on the client.
"tar": backup and restore via tar, tar over ssh, rsh or nfs.
$Conf{XferMethod} = 'smb';Compression level to use on files. 0 means no compression. Compression levels can be from 1 (least cpu time, slightly worse compression) to 9 (most cpu time, slightly better compression). The recommended value is 3. Changing to 5, for example, will take maybe 20% more cpu time and will get another 2-3% additional compression.
Configurations of emails
Minimum period between consecutive emails to a single user. This tries to keep annoying email to users to a reasonable level.
$Conf{EMailNotifyMinDays} = 2.5;
# will send an email every 3 days.Name to use as the "From" name for emails. Depending upon your mail handler this is either a plain name (eg: "admin") or a fully-qualified name (eg: "admin@mydomain.com").
$Conf{EMailFromUserName} = 'user';
$Conf{EMailFromUserName} = 'user@domain';Destination address to an administrative user who will receive a nightly email with warnings and errors. If there are no warnings or errors then no email will be sent. Depending upon your mail handler this is either a plain name (eg: "admin") or a fully-qualified name (eg: "admin@mydomain.com").
$Conf{EMailFromUserName} = 'admin';
$Conf{EMailFromUserName} = 'admin@domain';






![[Warning]](/ucome.rvt/any/en/Produits/LRS/details/doc/img/warning.png)



![[Tip]](/ucome.rvt/any/en/Produits/LRS/details/doc/img/tip.png)



