Pogo Plug v4 + Flashback
A timely discovery
I have been interested in automated backups of computer data since the mid 90’s, when I had a very well-timed hard disk failure. By pure chance, I had been working on a script that would copy my “important files” from my hard disk to a 100MB “Zip Drive”. I finished my script after testing it several times, and then I went to bed. The next morning, I woke up to find that my hard disk had crashed. Fortunately, I had a very recent backup!
I have often marveled at how easy it would be to lose invaluable files in a single mishap… countless memories, photos, financial records and project work. Backups are important.
BackupPC
When I worked at “the oven place” (TMIO), I was tasked with evaluating backup schemes for their factory and office PC’s. So I looked at several open source packages, with emphasis on being server-centric and automatic. That is, the backup server would decide when to make the backups, and the employees would never have to remember to do anything special. Any process that relies on a human to remember to kick it off is destined to be run once-a-year.
We ended up choosing “BackupPC“, which runs on a modest server with a large storage disk. It would wake up every so often and run through its list of clients and pick one to back up.
For several years, I ran BackupPC at home, too. At first, I ran it on a discarded PC. But later, I migrated to low-power fanless embedded boards.
Flashback
In 2013, I decided that BackupPC was taking too long to make backups. I would bring my laptop home from work and turn it on, and BackupPC would notice it and start backing it up. But the backups were taking so long that they would still be running when I was ready to leave for work the next morning! I ran a few tests with rsync to see if the problem was with BackupPC or the file compression or their crazy idea of how “incremental backups” should work. So I wrote what started out to be a speed test, and then a wrapper around “rsback”, and finally a very minimal python script that I named “Flashback“. “Flash” because it’s fast. My laptop backup, which was taking all night using BackupPC, usually completes in a half hour or less.
You can find Flashback on github.
The Pogo Plug v4
This week, I tried out a new hardware gadget called a Pogo Plug. It is a very close cousin to the SheevaPlug, an embedded Linux board which I had been BackupPC and Flashback on. What caught my attention about the Pogo Plug v4 was:
- It has two USB3 ports.
- It has gigabit ethernet.
- It was on sale for just $20.
The only bad part is that it only has 128MB of RAM… that’s only a quarter of what the SheevaPlug has. But I am not really using the memory for anything. I am just running rsync.
I did not spend any time using the stock firmware. Instead, I immediate enabled SSH and then followed these instructions for installing Arch Linux on a USB stick, which I plugged into the top plug (the bootable USB2 one). I plugged the 1-terabyte USB2 hard disk into the back of the Pogo Plug.
Then I installed Flashback and I modified the monitor script to take advantage of the three-color LED on the front (green for sleeping, yellow for backing up, red for error).
It’s been running for about a week now, and I think it has proven itself worthy.
I’d like to try it with a USB3 hard disk, and see if it’s any faster.
One comment
Leave a Reply
You must be logged in to post a comment.
I’ve been running flashback on the pogo plug for about a year, and I love it.
About a month ago, I had a hard disk crash on my MacBook, and so I replaced it with a SSD, installed OS X, and then restored my home directory and apps from my flashback backup. I lost NOTHING, because my backups are always fresh.
After that incident, I decided to buy a larger external hard disk for flashback. Prices have dropped, so I picked up a 3TB USB3 drive for about $100.
Recently, some friends asked me to set up clones of my system for them, so I made a few improvements in the process.
First, based on this blog post, I bought some low-profile USB sticks. The Sandisk Cruzer Fit is a pretty sweet option that fits low enough that you can close the Pogo Plug’s cover over it. It keeps the dust out, and it looks nicer sitting on the shelf.
Also, I found another article on that same QNology blog that gives instructions for installing Debian on the Pogo instead of Arch. I like Debian, so I tried this method out. One really nice feature of this installation method is that it does not require you to register with pogoplug.com to enable root SSH. Instead, there is a back door that enables SSH by hitting the plug with a simple HTTP request via “curl”.
While I was installing flashback on the new Pogo Plugs for my friends, I cleaned up the install process. Before, my github repo was sort of a grab-bag of raw ingredients: the flashback script, some sample config files, a few helper scripts to blink LEDs and to do some pre-startup work, and some init and systemd startup scripts. Now it’s a little better organized, and there’s some written instructions.
One big improvement was the addition of the “helper script”. Some systems need some extra stuff to run before flashback starts, and some need scripts to run WHILE flashback runs. For example, my Pogo Plug needs a pre-startup script to set the clock and to make sure LVM is ready and to mount the /backup volume. Also, I want to have an LED-blinker script running alongside flashback, so I can glance at the Pogo Plug and tell what’s going on. This extra stuff made installation confusing. Who starts the LED blinker? Do you need your own startup code in /etc/rc.local or in /etc/init.d/something?
So flashback now includes a “helper” option that runs a user-supplied script before starting any backups. This script can do all of the pre-work, like setting the clock and mounting volumes. It can also launch background scripts that blink the LED or that keep the USB hard disk from sleeping. When the helper script is finished, flashback starts its normal routine of backing stuff up.
I hope you find flashback to be useful. It has saved my bacon more than once, and it has become an integral part of my home network.