<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Omega Backup &#x2F; Restore Instructions revisited]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/2677/omega-backup-restore-instructions">Omega Backup / Restore Instructions</a></p>
<p dir="auto">I decided I needed to be able to backup my 4 (and counting!) Omega2 and Omega2+ devices, ideally to one place using the instructions in the aforementioned post.</p>
<p dir="auto">I erased a spare USB stick under Linux and created 4 primary partitions, each the same size. I labelled each partition with the relevant 4 characters of the MAC address (shown obfuscated here).</p>
<p dir="auto">On each Onion I then created the <em>/mnt/backup</em>  directory before running <code>/root/backup.sh</code> as shown below.</p>
<pre><code>#!/bin/sh

# backup.sh
# From: https://community.onion.io/topic/2677/omega-backup-restore-instructions

# My machines use /dev/sdb - YMMV !

# get the machine name
MACHINE=`/bin/uname -n`
# get today's date
TODAY=`date +%Y-%m-%d`

# which  machine am I on?
if [ $MACHINE = Omega-0001 ]; then
   mount /dev/sdb1 /mnt/backup
elif [ $MACHINE = Omega-0002 ]; then
   mount /dev/sdb2 /mnt/backup
elif [ $MACHINE = Omega-0003 ]; then
   mount /dev/sdb3 /mnt/backup
elif [ $MACHINE = Omega-0004 ]; then
   mount /dev/sdb4 /mnt/backup
else
   echo "machine $MACHINE unknown - exit"
   exit
fi

echo "Backing up $MACHINE"

# final check, to be sure ...

if [ -d /mnt/backup ]; then
   echo "backing up..."
else
   echo "NO BACKUP DEVICE found - exit"
   exit
fi

# standard MTDs

dd if=/dev/mtd0 of=/mnt/backup/uboot.bin
dd if=/dev/mtd1 of=/mnt/backup/ubootenv.bin
dd if=/dev/mtd2 of=/mnt/backup/factory.bin
dd if=/dev/mtd3 of=/mnt/backup/firmware.bin
dd if=/dev/mtd4 of=/mnt/backup/kernel.bin
dd if=/dev/mtd5 of=/mnt/backup/rootfs.bin
dd if=/dev/mtd6 of=/mnt/backup/rootfsdata.bin

# export UCI settings for good measure
uci export &gt; /mnt/backup/UCIexport_$TODAY

echo "all done"

exit
</code></pre>
<p dir="auto">Once the backup is complete on each machine you can then <code>umount /mnt/backup</code> and remove the USB stick.</p>
<p dir="auto">So looking at the finished 4 backups on another Linux box, the USB stick is mounted on /dev/sd<strong>C</strong>, here's a typical directory listing:</p>
<p dir="auto"><code>ls -l /media/peter/0004-backup</code></p>
<pre><code>total 41056
-rwxr-xr-x 1 peter peter     1086 Jul 10 13:41 backup.sh
-rw-r--r-- 1 root  root     65536 Jul 10 13:38 factory.bin
-rw-r--r-- 1 root  root  16449536 Jul 10 13:39 firmware.bin
-rw-r--r-- 1 root  root   1341962 Jul 10 13:39 kernel.bin
drwx------ 2 root  root     16384 Jul 10 13:08 lost+found
-rw-r--r-- 1 root  root  15107574 Jul 10 13:39 rootfs.bin
-rw-r--r-- 1 root  root   8781824 Jul 10 13:39 rootfsdata.bin
-rw-r--r-- 1 root  root    196608 Jul 10 13:38 uboot.bin
-rw-r--r-- 1 root  root     65536 Jul 10 13:38 ubootenv.bin
-rw-r--r-- 1 root  root      6459 Jul 10 13:39 UCIexport_2019-07-10
</code></pre>
<p dir="auto">... and free space:</p>
<p dir="auto"><code>df -h /dev/sdc*</code></p>
<pre><code>Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
/dev/sdc1       6.9G  120M  6.4G   2% /media/peter/0001-backup
/dev/sdc2       6.9G  120M  6.4G   2% /media/peter/0002-backup
/dev/sdc3       6.9G   72M  6.5G   2% /media/peter/0003-backup
/dev/sdc4       6.9G   72M  6.5G   2% /media/peter/0004-backup
</code></pre>
<p dir="auto">As you can see, my USB stick is <em>way</em>  too big and I'll see if I can find a smaller device instead.</p>
]]></description><link>http://community.onion.io/topic/3658/omega-backup-restore-instructions-revisited</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 15:51:56 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/3658.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Jul 2019 13:16:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Omega Backup &#x2F; Restore Instructions revisited on Wed, 10 Jul 2019 13:16:18 GMT]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/2677/omega-backup-restore-instructions">Omega Backup / Restore Instructions</a></p>
<p dir="auto">I decided I needed to be able to backup my 4 (and counting!) Omega2 and Omega2+ devices, ideally to one place using the instructions in the aforementioned post.</p>
<p dir="auto">I erased a spare USB stick under Linux and created 4 primary partitions, each the same size. I labelled each partition with the relevant 4 characters of the MAC address (shown obfuscated here).</p>
<p dir="auto">On each Onion I then created the <em>/mnt/backup</em>  directory before running <code>/root/backup.sh</code> as shown below.</p>
<pre><code>#!/bin/sh

# backup.sh
# From: https://community.onion.io/topic/2677/omega-backup-restore-instructions

# My machines use /dev/sdb - YMMV !

# get the machine name
MACHINE=`/bin/uname -n`
# get today's date
TODAY=`date +%Y-%m-%d`

# which  machine am I on?
if [ $MACHINE = Omega-0001 ]; then
   mount /dev/sdb1 /mnt/backup
elif [ $MACHINE = Omega-0002 ]; then
   mount /dev/sdb2 /mnt/backup
elif [ $MACHINE = Omega-0003 ]; then
   mount /dev/sdb3 /mnt/backup
elif [ $MACHINE = Omega-0004 ]; then
   mount /dev/sdb4 /mnt/backup
else
   echo "machine $MACHINE unknown - exit"
   exit
fi

echo "Backing up $MACHINE"

# final check, to be sure ...

if [ -d /mnt/backup ]; then
   echo "backing up..."
else
   echo "NO BACKUP DEVICE found - exit"
   exit
fi

# standard MTDs

dd if=/dev/mtd0 of=/mnt/backup/uboot.bin
dd if=/dev/mtd1 of=/mnt/backup/ubootenv.bin
dd if=/dev/mtd2 of=/mnt/backup/factory.bin
dd if=/dev/mtd3 of=/mnt/backup/firmware.bin
dd if=/dev/mtd4 of=/mnt/backup/kernel.bin
dd if=/dev/mtd5 of=/mnt/backup/rootfs.bin
dd if=/dev/mtd6 of=/mnt/backup/rootfsdata.bin

# export UCI settings for good measure
uci export &gt; /mnt/backup/UCIexport_$TODAY

echo "all done"

exit
</code></pre>
<p dir="auto">Once the backup is complete on each machine you can then <code>umount /mnt/backup</code> and remove the USB stick.</p>
<p dir="auto">So looking at the finished 4 backups on another Linux box, the USB stick is mounted on /dev/sd<strong>C</strong>, here's a typical directory listing:</p>
<p dir="auto"><code>ls -l /media/peter/0004-backup</code></p>
<pre><code>total 41056
-rwxr-xr-x 1 peter peter     1086 Jul 10 13:41 backup.sh
-rw-r--r-- 1 root  root     65536 Jul 10 13:38 factory.bin
-rw-r--r-- 1 root  root  16449536 Jul 10 13:39 firmware.bin
-rw-r--r-- 1 root  root   1341962 Jul 10 13:39 kernel.bin
drwx------ 2 root  root     16384 Jul 10 13:08 lost+found
-rw-r--r-- 1 root  root  15107574 Jul 10 13:39 rootfs.bin
-rw-r--r-- 1 root  root   8781824 Jul 10 13:39 rootfsdata.bin
-rw-r--r-- 1 root  root    196608 Jul 10 13:38 uboot.bin
-rw-r--r-- 1 root  root     65536 Jul 10 13:38 ubootenv.bin
-rw-r--r-- 1 root  root      6459 Jul 10 13:39 UCIexport_2019-07-10
</code></pre>
<p dir="auto">... and free space:</p>
<p dir="auto"><code>df -h /dev/sdc*</code></p>
<pre><code>Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
/dev/sdc1       6.9G  120M  6.4G   2% /media/peter/0001-backup
/dev/sdc2       6.9G  120M  6.4G   2% /media/peter/0002-backup
/dev/sdc3       6.9G   72M  6.5G   2% /media/peter/0003-backup
/dev/sdc4       6.9G   72M  6.5G   2% /media/peter/0004-backup
</code></pre>
<p dir="auto">As you can see, my USB stick is <em>way</em>  too big and I'll see if I can find a smaller device instead.</p>
]]></description><link>http://community.onion.io/post/19759</link><guid isPermaLink="true">http://community.onion.io/post/19759</guid><dc:creator><![CDATA[peter garner 0]]></dc:creator><pubDate>Wed, 10 Jul 2019 13:16:18 GMT</pubDate></item></channel></rss>