Thursday 18 June 2015

Back up my laptop task... even when it's off


I changed my backup software of choice from dejadup to Back In Time a couple of months ago, hoping I could have unattended back ups of two laptops, once a month, even if the laptops were turned off when the time came.

Back In Time uses cron to schedule a task at regular intervals. The problem is, if the laptop is turned off, or suspended when the task is supposed to activate, it never runs.

To work around this problem a second task could be scheduled so that it checks whether the scheduled back up took place, and starts it when it hasn't.

The first thing to check is whether Back In Time offers any way to check the last back up... yeap!

$ backintime --last-snapshot

Back In Time
Version: 1.0.34

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

INFO: Mountpoint /tmp/backintime/.../mountpoint is already mounted
SnapshotID: 20150530-212330-282
INFO: Mountpoint /tmp/backintime/.../mountpoint still in use. Keep mounted


Also, we can check the crontab:

$ crontab -l
#Back In Time system entry, this will be edited by the gui:
0 0 1 * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1

Now, we need to extract the last date backintime should have run from the crontab.

I can't find an easy way to do this yet...


Thursday 22 January 2015

SQL Server Express 2014 for local connections

Amazingly, the default configuration for SQLServer Express does not enable local connections. To enable them:
  1. Open the Sql Server Configuration Manager. Available at All Programs > Microsoft SQL Server ... > Configuration Tools
  2. Under SQL Server Network Configuration > Protocols for SQLEXPRESS, enable Named Pipes and TCP/IP as needed.

Oh well.