Laravel Backup

Screen-Shot-2016-03-08-at-00.22.28

If you’re a developer using Laravel I’d strongly recommend “Laravel Backup”, a package developed by the folks over at Spatie. Version 3 just got released:

Laraval Backup can backup the files and databases of your application to one or more external filesystems. It uses Laravel’s native cloud filesystem to do this. The package can also notify you via Slack and/or email when something goes wrong with your backups.

Running a simple php artisan backup:run will do all its magic. Not only can you make backups with this package; You can also monitor the health of your backups, purge old backups, hook into any of the many events, etc.

Laravel Backup →
Laravel Backup Introductory Blogpost →

Backup local MySQL Databases

Nice script by Xavez. Put it in a daily cronjob if you like, or extend it to copy the backup to another machine:

#!/bin/bash

# Path to where you want to backup mysql databases.
opath=/Users/username/Sites/Backups/mysql/

# Local mysql details. Make a username with only read access. Allow SELECT, LOCK TABLES.
mysqlhost=127.0.0.1
username=read_only_user
password=read_only_password

# Get current date and temporary directory.
date=$(date "+%Y-%m-%d-%H%M%S")
cpath=$opath/incomplete_back-${date}

	if [ -d $cpath ]
	then
		filler="just some action to prevent syntax error"
	else
		echo Creating $cpath
		mkdir -p $cpath
	fi
	
	#
	# Make backups. Adjust paths to binaries if necessary.
	#
	/usr/local/mysql/bin/mysql -s -r -u${username} -p${password} -e 'show databases' | while read db; do /usr/local/mysql/bin/mysqldump -u${username} -p${password} $db -r ${cpath}/${db}.sql; [[ $? -eq 0 ]] && /usr/bin/gzip ${cpath}/${db}.sql; done
	
	#
	# Symlink to latest backup.
	#
	mv $opath/incomplete_back-$date $opath/back-$date \
	&& rm -f $opath/current \
	&& ln -s back-$date $opath/current

DeliciousBackup, running a local, browsable backup of your Delicous bookmarks.

Now that there are rumors of Yahoo shutting down Delicious I found it necessary to keep my bookmarks safe and have a local, browsable copy of them.

Continue reading “DeliciousBackup, running a local, browsable backup of your Delicous bookmarks.”

Drobo, my experience so far.

This post is outdated. Not everything is accurate anymore. More than three years later I still have my Drobo running and have performed disk swaps without any problems. Drobo has grown up by now. One remaining issue though is the speed (although that should be better with the newer models): it’s not optimal.

A few months ago I bought a Drobo. Ever since I’ve been getting questions of future Drobo owners if the device is any good, what I use it for and if they should buy it too. I must say that I find it tough to answer them, as I have mixed feelings about this product.

Continue reading “Drobo, my experience so far.”