Home
Raspberry Pi
About / Contact
Craig Dugas - The man from Maine with a French last name
  • Home
  • Raspberry Pi
  • About / Contact
Browsing Category
Linux
Linux Raspberry Pi Tech

Quick Raspberry Pi Backup

I’ve never, ever made a backup and afterwards thought that was a waste of time. Either they save the day or they do no harm. Whenever I make a significant, radical, or wildly inappropriate mod to one of my Raspberry Pi computers, I’ll typically make a quick backup. Here’s how I do it.

This will be short and to the point, but there are a few important call-outs.

  1. Before you commit to a backup strategy, know the restoration plan.
  2. If possible, test the restoration plan before backing up something mission critical.
  3. Minimize use of the system being backed up during the backup process. If possible, don’t touch it!

This quick backup is not compressed (although that’s easy to do, compressing while backing up is painfully slow in my setup) and it’s pulled over the network to a RAIDed drive connected to a Mac Mini. That drive is backed up to Backblaze, however these are quick backups so they’re really only for fairly temporary use. For production backups, I’d encourage the use of compression.

Lo and behold, the quick backup.

The following command should be run from the destination computer, not from the system you are backing up. Replace x.x.x.x with the IP address of the Raspberry Pi you’d like to back up.

$ ssh [email protected] "sudo dd if=/dev/mmcblk0 bs=1M" | dd of=~/backup.img

Since compression is not in use, it won’t bog down the Raspberry Pi, but it will use space equivalent to the size of the micro SD card in the Pi.

One adjustment I recommend is to use Pipe Viewer, which will display a handy progress meter during the backup. It’s simple to install (install it to the machine performing the backup, not the one being backed up) and takes the guess work out of the question when is this backup going to finish? If you’re using Pipe viewer, the updated syntax will look like this:

$ ssh [email protected] "sudo dd if=/dev/mmcblk0 bs=1M" | pv | dd of=~/backup.img
Action shot when backup is piped through pv.

Finally, ensure the backup file was created on the destination and that no errors were displayed during the backup process.

Continue reading
Linux Tech Windows

Run Linux Terminal on Windows 10

Windows Subsystem for Linux (WSL) is an included feature on Windows 10 that allows you to run a Linux bash terminal. It’s geared towards developers and Microsoft explicitly states it’s not intended to run production workloads, but it’s super easy to install and is accessible and usable by anyone.

Installing the Windows Subsystem for Linux

  • Click the Start button and type (then select) Turn Windows Features on or off.
  • After the Windows Features window loads, scroll to the bottom and check the box next to Windows Subsystem for Linux.
  • Click OK.

The feature will be installed and will require a reboot. After installing the subsystem, you can then install a Linux distribution.

Installing a Linux Distribution

  • Click the Start button and type (then select) Microsoft Store.
  • Once loaded, search for Linux.
  • The results currently have a handy call-out, click Get the apps to select from supported Linux distributions.

Select a distribution and click Get. After installation, you’ll be able to launch it from the store or from the Start menu (e.g. you could just click Start and type Ubuntu to see the launchable app.

Final Thoughts

All in all, this is a quick way to set up a Linux terminal on a computer running Windows 10. It’s sort of like Cygwin, but it feels way more native. One of the most interesting things to me is how little system resources seem to be taken up running the Linux subsystem. That, and loading up an Ubuntu bash terminal on Windows is just as fast as loading up a bash terminal on a Mac.

A couple notes:

  1. Local system files are located at /mnt/c (type cd /mnt/c in the bash terminal).
  2. Linux IDEs (KDE/Gnome/etc.) are not supported.

Read more about Windows Subsystem for Linux at https://docs.microsoft.com/en-us/windows/wsl/faq

Continue reading

About Me

Hello, my name is Craig. I am a tech enthusiast living in Bozeman, Montana. This is my blog, where I post articles in the tech/life/food world.

If you happen to buy something through links on this site, I may get a small share of the sale. As an Amazon Asso​ciate I earn from qualifying pur​chases.

Categories

  • Digital Piano
  • Linux
  • Music
  • Performance
  • Raspberry Pi
  • Tech
  • Windows
  • Wordpress

Tags

backup linux performance pv raspberrypi terminal ubuntu windows

Recent Posts

Connect (iPad) Simply Piano to a Digital Piano MIDI Port Wirelessly

Connect (iPad) Simply Piano to a Digital Piano MIDI Port Wirelessly

January 17, 2021
Quick Raspberry Pi Backup

Quick Raspberry Pi Backup

March 16, 2019
Windows Download Folder is SLOW – Fixed!

Windows Download Folder is SLOW – Fixed!

March 14, 2019

Connect

® 2011 All rights reserved.