Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
backup_daemon-2.1.tar.bz2 | 2013-10-31 | 17.1 kB | |
backup_daemon-2.0.tar.bz2 | 2012-08-03 | 17.0 kB | |
README | 2012-01-16 | 3.4 kB | |
Totals: 3 Items | 37.5 kB | 0 |
BACKUP-DAEMON 2.0 ------------------------------------------------------ BACKUP-DAEMON is a perl script (backup_daemon.pl) that is written to automate backups to an external hard drive that is not permanently connected to the computer. This external hard drive is identified by a partition, and when that partition is connected (appears in /dev/), the script will start the backup using rdiff-backup. It uses a profile file (in /etc/backup_daemon/name.profile) to determine which partition to check for, and whether that partition is the partition to back up to, or whether it uses an LVM2 system (in which case it will backup to the volume set in the profile). In the profile, you can define which directories to back up, how much days to keep it, and the interval between to connection checks. The backup will run once a day. Should the external drive contain a LVM2 volume, it must contain at least one (normal) partition (with an UUID appearing in /dev/) (and set in the profile), otherwise this script will fail. If set in the profile, the script will use a LVM volume as back up. This script is built around rdiff-backup, thus supporting exclude files (--exclude-globbing-filelist switich of rdiff-backup). One file can be provided per profile (set in the profile). When backing up multiple directories, the script will split the exclude file if appropriate (if /foo/bar is excluded, but a backup is performed of both /foo and /bar, it will only list it as an exclude when backing up /foo). USAGE: ====== /usr/bin/backup_daemon.pl -p profile is the (not recommended) way of using it, as this will occupy your terminal. Better run in the background (with an '&'). /usr/bin/backup_daemon.sh profile is the way the systemd-daemon starts it. This script calls /usr/bin/backup_daemon.pl -p profile in the background and redirects STDOUT to /var/log/backup_daemon/date and STDERR to /var/log/backup_daemon/error.date /usr/bin/configure_backup_daemon.sh profile is a configuration script will which set up a profile and exclude file, create a systemd .service file for that profile and enable it. (To disable a systemd service, use systemctl disable backup_daemon_profile_name.service) INSTALLATION: ============= Copy the three scripts (backup_daemon.pl, backup_daemon.sh and configure_backup_daemon.sh) to /usr/bin; create the directory /etc/backup_daemon/ and /var/log/backup_daemon/ and run /usr/bin/configure_backup_daemon.sh This script requires rdiff-backup and mount.external.lvm.sh (https://sourceforge.net/projects/pitah/files/RPMS/mount_lvm-addons-1.0-2.fc16.noarch.rpm) as well as the DateTime, FilePath and GetoptStd perl modules. EXIT STATUS: ============ 0: Succesful run 2: No profile specified 4: Required configuration option missing 10: Failed to mount backup volume LICENSE: ======== Copyright (c) 2012 Pieter De Praetere (depraetere.pieter@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of version 3 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.