Backups

From FnordWiki
Revision as of 23:47, 13 January 2014 by Adj (talk | contribs)
Jump to navigation Jump to search

Backups would be nice. And there is an excess of hardware to do them to at home.

sacredchao to be master server and do backups to USB connected removable drives.

bitkeeper to power on as needed and get replicas of backup sets from sacredchao stored on local disks

honkingbigtapelibrary to power on as needed and get replicas of bitkeeper 's replicas.

Mom's Windows PC to run storage daemon and do backups to locally attached external USB drive.

youngmi's linux box to also run storage daemon, back up to external USB drive and replicate backup sets to Greeley.

overoverkill? You decide.

Basic bareos setup

  • Build bareos binaries for needed platforms:
  • Install a director somewhere. sacredchao seems like a good choice.
    • The director is in charge of things. It has the database of backups, job definitions, and all that sort of stuff.
    • Support for three different databases is available. I'll take SQLite over PostgreSQL over MySQL, given the option. (No extra layer of database engine needed (just a tiny library), no additional services exposed to the network, very transparent (UNIX filesystem permissions) security model.)
    • director package installation command was: sudo dpkg -i bareos-director_13.2.2-7.1.fnord.0_amd64.deb bareos-database-common_13.2.2-7.1.fnord.0_amd64.deb bareos-database-sqlite3_13.2.2-7.1.fnord.0_amd64.deb bareos-common_13.2.2-7.1.fnord.0_amd64.deb bareos-database-tools_13.2.2-7.1.fnord.0_amd64.deb

Director configuration bits from /etc/bareos/bareos-dir.conf:

 Director {                      # define myself
        Name = fnord-dir        # the organization is "fnord".  The director is an organization-wide resource, name it a
        QueryFile = "/usr/lib/bareos/scripts/query.sql"
        Maximum Concurrent Jobs = 1
        Password = "a big string from 'pwgen -sync 48'"   # Console password ("pwgen -sync 48" made this)
        Messages = Daemon

        # remove comment in next line to load plugins from specified directory
        # Plugin Directory = /usr/lib/bareos/plugins

        DirAddresses = {        # we have a number of these.  Let's not listen to Internet-facing addresses
                ipv4 = {
                        addr = 172.16.0.1;
                }
                ipv4 = {
                        addr = 10.255.248.1;
                }
                ipv6 = {
                        addr = 2001:470:ba93:10::1;
                }
                ipv6 = {
                        addr = 2001:470:1f0f:5be::1;
                }
        }
}

Trying to start the director by running the init script now fails. Some poking around found nothing recorded by syslog. Tracing the init script eventually got me to running the director by hand to look for output...

adj@sacredchao:/var/log$ sudo /usr/sbin/bareos-dir -t -v
bareos-dir: dird.c:1087-0 Could not open Catalog "MyCatalog", database "bareos".
bareos-dir: dird.c:1092-0 sqlite.c:172 Database /var/lib/bareos/bareos.db does not exist, please create it.
13-Jan 16:36 bareos-dir ERROR TERMINATION
Please correct configuration file: bareos-dir.conf
adj@sacredchao:/var/log$ 

That's actually quite instructive. Let's see about sorting that out. I really think I should call the database after the organization (fnord).