Backing Up Arch Linux ARM (ALARM) on Pogoplug

I’ve installed Arch Linux Arm on 1GB flash drive. I want to maintain a backup of the root filesystem in case something goes wrong with the flash, so that I can restore the root filesystem to a new drive/flash and boot my system.

I’ve used rsync utility to maintain a mirror copy of the root filesystem (excluding some directories) on the external hard drive I’m attaching to pogoplug. The advantage of using rsync is that each time you run the backup command, it will just copy what has changed. it’s a sort of incremental backup.

Here is a simple command to perform backup:
(must by run as root)

# rsync -av --delete-excluded --exclude-from=backup.lst / <backup_destination>

Where:

  • <backup_destination>: is the directory where we want to keep the backup (e.g. /media/storage/backup)
  • backup.lst: is file containing list of files/directories to exclude/include. here is a starting list:
# Include
+ /dev/console
+ /dev/initctl
+ /dev/null
+ /dev/zero

# Exclude
- /dev/*
- /run/*
- /proc/*
- /sys/*
- /tmp/*
- lost+found/
- /media/*
- /mnt/*

You may add a crontab entry to have the backup run on certain schedule (e.g. daily)

If something goes wrong with the boot flash and you can’t boot into ALARM, you can restore the backup to a new flash using the following steps:

(you need a PC running Linux, or a Linux virtual machine running on any OS)

  1. Mount the drive that contains the backup (e.g. /mnt/backup)
  2. Format a new flash drive as if you are going to have fresh ALARM installation, and mount it (e.g. /mnt/new)
  3. Copy the backup to the new flash drive:
# cp -a /mnt/backup/* /mnt/new

Add a label for the new flash root partition if you are using one:

# e2label <new_flash_root_device> <label>

Finally, boot Pogoplug using the new restored flash.

8 thoughts on “Backing Up Arch Linux ARM (ALARM) on Pogoplug

  1. Hello,

    I am having trouble getting the command to work. I am running current ArchlinuxARM on a Pogoplug V2.

    I execute this command:
    rsync -av –delete-excluded –exclude-from=backup.lst /media/hdd1/bu

    And I receive this output in SSH:
    sending incremental file list
    drwxrwxrwx 0 2013/08/30 21:19:05 bu

    sent 49 bytes received 13 bytes 124.00 bytes/sec
    total size is 0 speedup is 0.00

    My backup.lst file is identical to the example you proived.

    Thank you for your time and consideration.
    jess

    • Hello Jess,

      I see the backup command is missing the root path “/” (or whatever path you want to backup). It should appear before the backup destination in the command.

      If you backup root filesystem, the command should read:

      rsync -av –delete-excluded –exclude-from=backup.lst / /media/hdd1/bu

      Hope that helps.

  2. Hi,

    I’ve used your guide to set up daily backups on my ArchLinuxARM Pogoplug (set up using Qui’s techNOLOGY Blog), and everything is backing up perfectly. However, when I copy this backup to a newly formatted/partitioned USB drive and try to boot from the new drive, it fails to boot (I cannot SSH into the system). Is there a file somewhere that I need to add or modify to make this bootable?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *