This blog is my notebook for computer and technology related information, copies of useful webcontent (with refs of course), troubleshooting, general tips and setups that work well for me.

Useful tags:

Blog

BackupPC is a very powerful utility for central backup of servers and workstations.

Since all backupc will reside on the backup servers disk, it's important to create archives and store them offline and at a remote site.

This script will perform an archive of all hosts using the settings of the archive host in the web interface.

backuppc-archive-all.sh
#!/bin/bash
# Backuppc archive utility
# Archives all hosts to the configured archive host
# Author: Bernhard Brunner 
# Last modified: 2017-10-27 20:16
hostsfile="/etc/backuppc/hosts"
archivestart="/usr/share/backuppc/bin/BackupPC_archiveStart"
hosts=""
while read -r line; do
    # Skip comments
    [[ "$line" =~ ^#.*$ ]] && continue
 
    host=`echo $line | cut -f 1 -d " "`
    [ "$host" != "" -a "$host" != "archive" -a "$host" != "host" ] && continue
 
    hosts="$hosts $host"
done < "$hostsfile"
echo Backing up $hosts
sudo -u backuppc $archivestart archive backuppc $hosts
2017-10-27 20:25 · brb · 0 Comments

Archive

Blog History

2009-05: 18 entries 2009-06: 12 entries 2009-07: 9 entries 2009-08: 5 entries 2009-09: 2 entries 2009-10: 2 entries 2009-11: 5 entries 2009-12: 4 entries 2010-01: 1 entry 2010-02: 3 entries 2010-03: 2 entries 2010-04: 2 entries 2010-05: 3 entries 2010-06: 10 entries 2010-07: 8 entries 2010-08: 5 entries 2010-09: 4 entries 2010-10: 6 entries 2010-11: 2 entries 2010-12: 6 entries 2011-01: 5 entries 2011-02: 3 entries 2011-03: 5 entries 2011-04: 2 entries 2011-05: 4 entries 2011-06: 5 entries 2011-07: 11 entries 2011-08: 12 entries 2011-09: 4 entries 2011-10: 4 entries 2011-11: 2 entries 2011-12: 1 entry 2012-01: 5 entries 2012-02: 2 entries 2012-04: 3 entries 2012-06: 1 entry 2012-09: 4 entries 2012-10: 1 entry 2013-04: 1 entry 2014-04: 10 entries 2014-08: 2 entries 2015-04: 1 entry 2015-09: 3 entries 2016-04: 1 entry 2016-05: 1 entry 2016-06: 1 entry 2016-07: 2 entries 2016-10: 1 entry 2017-01: 1 entry 2017-02: 2 entries 2017-04: 1 entry 2017-05: 1 entry 2017-07: 2 entries 2017-08: 1 entry 2017-10: 1 entry 2017-11: 1 entry

November

October

August

July

May

April

February

January

October

July

June

May

April

September

April

August

April

April

October

September

June

April

February

January

December

November

October

September

August

July

June

May

April

March

February

January

December

November

October

September

August

July

June

May

April

March

February

January

December

November

October

September

August

July

June

May