lundi 27 novembre 2017

Ubuntu 17.10

Last month I upgraded kid3 & run12l.  No issue, even got the latest Darktable etc so I didn't need to add any ppa so far.  Yesterday I also upgraded base so all OK for now.  I took a look inside (this is a Packard Bell B2501 BE).  Still spare room for disks (both SATA-several connectors free and one free IDE connector) and cards (no extension cards on the motherboard, using the on-board audio and video circuits).  There are 2 PCI slots and at least two PCIe slots (1x and longer).  There's also only 1 DIMM slot used and thus the second one is free.  Looks like this required DIMM DDR2 800.  Iirc the CPU is an E2200.  There's an unused HDD in that box, with only Linux partitions (/ swap /home probably) and it's about 200GB.  It still works (I connected it temporarily for testing) and seems to have data from 2014.  I think /home is empty though so nothing to save from there.  Could probably be used as recovery boot in case of failure of the main SATA HDD.

I ordered a PCIe 4-port USB3 card to install in this box in order to speed up the archives so I can start rolling out with my off-site backups.  I also bought a Maxtor M3 2Tb USB3 external hard disk (at Black Friday prices, 63€) but I still have to pick that up.

I might buy a used monitor screen to replace the one used by kid3 so I can move that one to base in order to troubleshoot a boot failure that I had when the IDE drive was connected (seen as /dev/sda).

dimanche 19 novembre 2017

Automounting removable USB disks for use as backuppc archive volumes

I want to be able to plug in a few (at least 2) removable HDD drives and use them to store my latest backups, so I can easily move these HDD drives offsite for additional protection against theft, fire or other catastrophic events.

Required software

 sudo apt install autofs

/etc/auto.master 

#
# Maps for external HDD etc 
# 
/var/backups/backuppcv /etc/auto.removable --timeout=2 

/etc/auto.removable

Currently I own two of these drives (Iomega is 1TB and Targa is 512MB).  Both are quite old but I plan to add a 2TB (or a couple of them) in the near future.  I did check the blkid from each of these drives then added these lines to my new auto.removable config file:
#
# Maps for external HDD etc
#
iomega    -fstype=ext2    :UUID=e66dd072-7a29-4021-8cea-6757bf3b566a
targa    -fstype=ext3    :UUID=bd524c4e-2c59-4685-9458-74b21a9c33cd


Activation


sudo service autofs restart

Permissions

mkdir /var/backups/backuppcv/iomega/backuppc
chown backuppc:backuppc /var/backups/backuppcv/iomega/backuppc

Usage with backuppc

sudo cat arc_iomega.pl
$Conf{XferMethod} = 'archive';
$Conf{ArchiveDest} = '/var/backups/backuppcv/iomega/backuppc';

vendredi 7 octobre 2016

Home network SMTP MUA setup

MUA - mail user agent - setup for home

As an alternative to my (non-working) attempts from 2008, I now use an MTA setup and talk directly to the SMTP server outside my home network in order to send emails.  This includes posting to Flickr, using their email upload facility.  Here's the setup about SMTP only, the Flickr stuff would be for a followup article.  This setup is based on mutt formatting the outgoing emails then talking to msmtp in order to actually send them.

Mail User Agent

Don't sweat it.  Install mutt.  It's perfect for scripting, attaching files, specifying addresses and so on.

sudo apt update
sudo apt upgrade
sudo apt install mutt

Configure mutt to use msmtp

Edit ~/.muttrc:
set sendmail="/usr/bin/msmtp"
set from=your@email.com
set realname = "Luc Moreau"
set use_from = "yes"
set envelope_from = "yes"

SMTP Gateway

Install msmtp

sudo apt install msmtp

Configure msmtp

Edit ~/.msmtprc, for example sending to gmail:
 # Google account
account    gmail
host    smtp.gmail.com
port    587
from    someaddress@gmail.com
user    someuser
password somepassword
The address above should be an email address.  The user/password are whatever google requires to login to that account interactively.  "someuser" might be the same as "someaddress".

vendredi 24 juin 2016

The great home network

Again, some changes

[Provider router]
  • wi-fi
  • eth1 - free
  • eth0 - blue cable downlink to switch BR604
  •  [Switch B4R 604]
    • Downlink towards permanently connected Desktop computer
    • Daisy Chain to Alcatel Speedtouch 510v4
      • Setup as Bridged, will be used as a dumb hub/switch
      • Disabled DHCP
      • Disabled DNS
      • Downlinks towards 3 unused RJ45 cables in two bedrooms and TV room
    • Daisy Chain to Wifi AP Dlink towards the back of the house
      • DHCP disabled
      • DNS Disabled? 
      • Wifi enabled WPA2
      • Downlink to backup server in same room
      • Downlink to Wifi AP Sitecom towards the garden
        • Sitecom Wifi AP
          • Fixed IP 192.168.3.1
          • DHCP enabled, range restricted 3.100...3.200
          •  No further RJ45 downlinks
Equipment removed: Dlink DI614+ due to no support for WPA2 and couldn't get it to work anymore.  Kept the power adapter and Wifi antenna.

mercredi 15 juin 2016

Switching backuppc from SMB to rsyncd on Windows

SMB performance was poor so I figured I'd try the rsyncd method like I do on linux clients.  That turned out to be a little bit hairy so here are some notes;
  • This is based on https://doc.ubuntu-fr.org/backuppc#sauvegarder_des_postes_windows_via_rsyncd
  • Installed cygwin-rsyncd from Sourceforge
  • Tweaked rsyncd.conf to allow access to the cDrive module from my backup host only and for the backuppc user only.  Also calling this module "Users" and pointing it to C:\Users
  • Added backuppc to rsyncd.secrets
  • Took some time to find out how to stop/start the rsyncserver service (cmd must be started as administrator for this to work)
  • Open port 873 with a new rule in Windows Firewall (or any other FW software running).
  • Tweaked my client configuration in backuppc using the GUI (use rsync, point to the correct module, etc...)
  • Now a full backup is running.  If that works I know I'll probably still need to tweak the include/exclude stuff

lundi 13 juin 2016

New backuppc host - using SMB


  • Created new local Windows user for backuppc (admin, set a password)
  • Add the new host to backuppc server using the web GUI
  • Share c:\users on Windows level.  Authorize only backuppc (full control)
  • Test with smbclient from the backup server: 
    • /usr/bin/smbclient \\\\run12\\Users -Ubackuppc  -E -d 1 -c tarmode\ full -Tc -
  • Changed some global XFER options (name of SMB share=Users)
  • Changed permissions on Windows level to give Administrators "full control" on the share.  That seems to cure the NT_STATUS_ACCESS_DENIED errors on all kinds of directories.


New laptop

Today I bought a new (used) laptop -- Dell Latitude E6220 with 6GB RAM, 500GB HD, Windows 7 Pro 64bits, Core i-5 2520M @ 2.50 GHz and I can't see an SSD in there.
Installed Windows Security Essentials, Windows Live ID.
The plan is to split the disk and install Xubuntu in dualboot anytime soon.

The laptop itself is pretty nice, small 12" screen WXGA resolution, the battery humps on the back but should hopefully support the faster-than-average-for-its-era CPU.  The graphics are basic Intel HD 3000 or something.  Ports for HDMI, USB (2.0 only), eSATA, VGA, SD, eID and ExpressCard.  So far so good.  No SCSI, RS-232 or parallel port though? That's how I know it's recent enough for me :-)

Next step: Configure Backuppc for this.