This shows you the differences between two versions of the page.
— |
ariel [2014/11/24 01:14] (current) 0.0.0.0 created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Ariel ====== | ||
+ | [[Category: | ||
+ | [[Category: | ||
+ | [[Category: | ||
+ | |||
+ | ===== Overview ===== | ||
+ | * Type: Virtual machine | ||
+ | * Location: [[Badger]] | ||
+ | * URL: http:// | ||
+ | * Provides: | ||
+ | * Backup server | ||
+ | |||
+ | * Specification | ||
+ | * 256Mb Ram | ||
+ | * 2x 100Mb Ethernet | ||
+ | * 20Gb Virtual Disk | ||
+ | * Serial port (mapped to [[Badger]]:< | ||
+ | |||
+ | ===== Filesystems ===== | ||
+ | {| class=" | ||
+ | |+ Filesystems | ||
+ | |- | ||
+ | ! Device | ||
+ | ! Size | ||
+ | ! Filesystem | ||
+ | ! Mount point | ||
+ | ! UUID | ||
+ | ! Notes | ||
+ | |- | ||
+ | | /dev/sda1 | ||
+ | | 128Mb | ||
+ | | ext2 | ||
+ | | /boot | ||
+ | | bb61e803-7c8e-4d0f-82fb-3193c08eae8a | ||
+ | | | ||
+ | |- | ||
+ | | /dev/sda2 | ||
+ | | 256Mb | ||
+ | | swap | ||
+ | | //none// | ||
+ | | cf067b46-b24f-4a20-87ee-d87663171369 | ||
+ | | | ||
+ | |- | ||
+ | | /dev/sda3 | ||
+ | | 19Gb | ||
+ | | lvm | ||
+ | | //none// | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | / | ||
+ | | 1Gb | ||
+ | | ext3 | ||
+ | | /home | ||
+ | | aa0b9d4c-5d99-4cf4-b2bf-178f92d92c28 | ||
+ | | | ||
+ | |- | ||
+ | | / | ||
+ | | 8Gb | ||
+ | | ext3 | ||
+ | | / | ||
+ | | 71336918-f31d-4756-a965-1476cd67b687 | ||
+ | | | ||
+ | |- | ||
+ | | / | ||
+ | | 10Gb | ||
+ | | ext3 | ||
+ | | /var | ||
+ | | 3cb9ca13-2d68-4faa-b93a-75037520cfa3 | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | ===== Installation ===== | ||
+ | Ariel was installed using the [[Gentoo/ | ||
+ | |||
+ | ==== Installed software ==== | ||
+ | Also see: | ||
+ | * [[Gentoo/ | ||
+ | |||
+ | === Backups === | ||
+ | * {{Package|direct=yes|app-arch/ | ||
+ | * {{Package|direct=yes|app-backup/ | ||
+ | * {{Package|direct=yes|dev-lang/ | ||
+ | * {{Package|direct=yes|sys-devel/ | ||
+ | * {{Package|direct=yes|sys-fs/ | ||
+ | * {{Package|direct=yes|www-apache/ | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | ==== Network ==== | ||
+ | {| class=" | ||
+ | |+ Network adapters | ||
+ | |- | ||
+ | ! Hardware | ||
+ | ! Driver | ||
+ | ! Device | ||
+ | ! Mac | ||
+ | ! IP | ||
+ | ! DHCP/Static | ||
+ | |- | ||
+ | | AMD PCnet32 | ||
+ | | pcnet32 | ||
+ | | eth0 | ||
+ | | 00: | ||
+ | | | ||
+ | | //none// | ||
+ | |- | ||
+ | | AMD PCnet32 | ||
+ | | pcnet32 | ||
+ | | eth1 | ||
+ | | 00: | ||
+ | | | ||
+ | | dhcp | ||
+ | |} | ||
+ | |||
+ | ==== iSCSI ==== | ||
+ | Follow the instructions on [[ISCSI]] to mount a 100GB drive from [[Badger]] into < | ||
+ | |||
+ | ==== NFS ==== | ||
+ | Backups will be archived over to [[Athens]] in case of hardware failure on Ariel or Badger. Mount < | ||
+ | {{File|/ | ||
+ | - NFS mounts | ||
+ | athens.jellybean.sihnon.net:/ | ||
+ | </ | ||
+ | |||
+ | Ensure that Ariel has permissions to access the exported filesystem using Athens' | ||
+ | |||
+ | Then start nfsmount, and ensure it autostarts on boot: | ||
+ | {{Root|< | ||
+ | / | ||
+ | rc-update add nfsmount default | ||
+ | </ | ||
+ | |||
+ | ==== BackupPC ==== | ||
+ | Having installed perl and libperl with thread support, several perl modules may need to be recompiled to be compatible. Re-emerge the following packages: | ||
+ | * {{Package|direct=yes|dev-perl/ | ||
+ | * {{Package|direct=yes|perl-core/ | ||
+ | * {{Package|direct=yes|perl-core/ | ||
+ | |||
+ | BackupPC is installed with __TOPDIR__ configured as < | ||
+ | |||
+ | Ensure that backuppc has write access to the backups filesystem, and the archive filesytsem by running the following command after both have been mounted. | ||
+ | {{Root|< | ||
+ | setfacl -R -m u: | ||
+ | </ | ||
+ | |||
+ | Apache needs to be run as the backuppc user so that the CGI interface can access the backups filesystems. Edit the apache configuration to change the user from apache to backuppc: | ||
+ | {{File|/ | ||
+ | User backuppc | ||
+ | Group backuppc | ||
+ | </ | ||
+ | |||
+ | Configure backuppc' | ||
+ | {{File|/ | ||
+ | - Have backuppc attempt to start new backups every hour from midnight to 7am | ||
+ | $Conf{WakeupSchedule} = [[0..7]]; | ||
+ | |||
+ | - Allow backuppc to run 2 automated, and 2 manual backups at once | ||
+ | $Conf{MaxBackups} = 2; | ||
+ | $Conf{MaxUserBackups} = 2; | ||
+ | |||
+ | - Configure the dhcp pools for machines with dynamic IPs. | ||
+ | - This information can be found in subversion, at configs:/ | ||
+ | $Conf{DHCPAddressRanges} = [[ | ||
+ | | # servers | ||
+ | { | ||
+ | first => 20, | ||
+ | last => 39, | ||
+ | }, | ||
+ | # jellybean | ||
+ | { | ||
+ | first => 100, | ||
+ | last => 129, | ||
+ | }, | ||
+ | # unknown clients | ||
+ | { | ||
+ | first => 130, | ||
+ | last => 199, | ||
+ | }, | ||
+ | # infrastructure | ||
+ | { | ||
+ | first => 220, | ||
+ | last => 239, | ||
+ | }, | ||
+ | ]]; | ||
+ | |||
+ | - By default, take a full backup once a week, and an incremental backup daily | ||
+ | $Conf{FullPeriod} = 6.97; | ||
+ | $Conf{IncrPeriod} = 0.97; | ||
+ | |||
+ | - Keep a history of backups in order to recover from old issues | ||
+ | - This config keeps backups from weeks 1, 2, 4, 6, 10 and 18 | ||
+ | $Conf{FullKeepCnt} = [[2,|2, 1, 1]]; | ||
+ | |||
+ | - Make sure these backups are kept around, but clear out any older ones | ||
+ | $Conf{FullKeepCntMin} = 1; | ||
+ | $Conf{FullAgeMax} | ||
+ | |||
+ | - Keep the full weeks worth of incremental backups, and clear out any old ones | ||
+ | $Conf{IncrKeepCnt} | ||
+ | $Conf{IncrKeepCntMin} = 1; | ||
+ | $Conf{IncrAgeMax} | ||
+ | |||
+ | - Exclude certain directories by default (can be overridden per-host). | ||
+ | $Conf{BackupFilesExclude} = [[ | ||
+ | | '/ | ||
+ | '/ | ||
+ | '/ | ||
+ | ]]; | ||
+ | |||
+ | - Use rsync by default (can be overridden per-host) | ||
+ | $Conf{XferMethod} = ' | ||
+ | |||
+ | - Send email alerts to a useful address | ||
+ | $Conf{EMailFromUserName} = ' | ||
+ | $Conf{EMailAdminUserName} = ' | ||
+ | $Conf{EMailUserDestDomain} = ' | ||
+ | |||
+ | - URL to the CGI interface (for email alerts) | ||
+ | $Conf{CgiURL} = ' | ||
+ | </ | ||
+ | |||
+ | Per-host configuration files are stored in < | ||
+ | {{File|/ | ||
+ | - hostname | ||
+ | - OS | ||
+ | - Purpose | ||
+ | $Conf{RsyncShareName} = '/'; | ||
+ | $Conf{BackupFilesExclude} = [[ | ||
+ | | '/ | ||
+ | '/ | ||
+ | '/ | ||
+ | ]]; | ||
+ | |||
+ | - vim: set filetype=perl ts=4 expandtab: | ||
+ | </ | ||
+ | |||
+ | Finally, let backuppc know about each of the hosts: | ||
+ | {{File|/ | ||
+ | host dhcp user moreUsers | ||
+ | ariel.jellybean.sihnon.net | ||
+ | </ | ||
+ | |||
+ | === Archives === | ||
+ | Have backuppc archive the most recent full backups to [[Athens]] for safekeeping. Add the following entry in the hosts file: | ||
+ | {{File|/ | ||
+ | host dhcp user moreUsers | ||
+ | athens.jellybean.sihnon.net | ||
+ | </ | ||
+ | |||
+ | Then add a per-host config file for athens to configure the archives: | ||
+ | {{File|/ | ||
+ | - athens.jellybean.sihnon.net | ||
+ | - NAS | ||
+ | - Backup near-line archive | ||
+ | $Conf{XferMethod} = ' | ||
+ | |||
+ | - The path on the local filesystem where backups will be written | ||
+ | $Conf{ArchiveDest} = '/ | ||
+ | |||
+ | - Type and level of compression used in the archive | ||
+ | $Conf{ArchiveComp} = ' | ||
+ | $Conf{CompressionLevel} = 1; | ||
+ | |||
+ | - The amount of parity data to create for the archive | ||
+ | $Conf{ArchivePar} = 5; | ||
+ | |||
+ | - vim: set filetype=perl ts=4 expandtab: | ||
+ | </ | ||
+ | |||
+ | Now, when athens is selected in the CGI interface, an option to start an archive backup is available. To run the archive, chose this option, and select the desired hosts. The defaults on the final page of the wizard are acceptable, having been configured in the athens config file, so just click start. | ||
+ | |||
+ | ===== Hardware ===== | ||
+ | ==== lspci ==== | ||
+ | < |