Assistance Needed - Simple backup and restore procedures

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Assistance Needed - Simple backup and restore procedures

Postby apowell656 » Wed Feb 06, 2013 6:33 pm

I am fairly new to linux. I have my system setup the way that I would want it for the most part (Transmission is not working and I have used -> pacman -Syu) Through some levels of frustration I have installed and reinstalled the system a few times, but would like some help finding the simplest way to 1)back things up and restore in the event I need to do a clean system install 2) schedule an automatic backup.

I am thinking that it would be safe to have a clean install safe on an additional flash drive and possibly keep a backup folder on an external drive. I have checked out the following links http://archlinuxarm.org/forum/viewtopic.php?f=29&t=4856 and http://archlinuxarm.org/forum/viewtopic.php?f=9&t=1991, but would appreciate some feedback from a more experienced user.

Thanks in advance.

- Andre
apowell656
 
Posts: 37
Joined: Fri Jan 25, 2013 1:24 am

Re: Assistance Needed - Simple backup and restore procedures

Postby xenoxaos » Wed Feb 06, 2013 6:55 pm

There are two good ways to do this, and they depend on your disk size.
One way to do it if your disk is < 8G (or any size really, but it would take a long time to do it and take hdd space) would be to just make an image of the rootfs using dd.

From another computer running Linux, plug in your rootfs drive and make sure it's not mounted.
Code: Select all
dmesg | tail # will give you some stuff about /dev/sdX or /dev/mmcblkX, remember this.
sudo dd if=/dev/sdX of=rootfs.backup.date.img bs=4M

You can also compress it too...
I prefer piping dd through lzma, it's slow but compresses well
Code: Select all
dd if=/dev/sdX | lzma -9c > rootfs.backup.date.img #adjust the -9c to -7c if you get out of memory errors

and then restore with
Code: Select all
lzcat  rootfs.backup.date.img | dd of=/dev/sdX bs=4M ###!!! make sure the /dev/sdX is the right one or you could wipe your hard drive.


or if your rootfs is much larger...you can make a tarball of it.
From another computer, mount your rootfs and become root...
Code: Select all
sudo su
cd /media/path_to_rootfs
tar -cvzf /home/user/whereyouwantyourbackuptobe/rootfs.backup.date.tar.gz ./
Arch Linux ARM exists and continues to grow through community support, please donate today!
xenoxaos
Developer
 
Posts: 323
Joined: Thu Jan 06, 2011 1:45 am

Re: Assistance Needed - Simple backup and restore procedures

Postby apowell656 » Wed Feb 06, 2013 8:32 pm

Thank you for the quick reply. I hope this is not a stupid question, but I should be able to perform these steps from the Mac Terminal, right? And if that is not a possibility the maybe by ssh and the PogoPlug?

xenoxaos wrote:There are two good ways to do this, and they depend on your disk size.
One way to do it if your disk is < 8G (or any size really, but it would take a long time to do it and take hdd space) would be to just make an image of the rootfs using dd.

From another computer running Linux, plug in your rootfs drive and make sure it's not mounted.
Code: Select all
dmesg | tail # will give you some stuff about /dev/sdX or /dev/mmcblkX, remember this.
sudo dd if=/dev/sdX of=rootfs.backup.date.img bs=4M

You can also compress it too...
I prefer piping dd through lzma, it's slow but compresses well
Code: Select all
dd if=/dev/sdX | lzma -9c > rootfs.backup.date.img #adjust the -9c to -7c if you get out of memory errors

and then restore with
Code: Select all
lzcat  rootfs.backup.date.img | dd of=/dev/sdX bs=4M ###!!! make sure the /dev/sdX is the right one or you could wipe your hard drive.


or if your rootfs is much larger...you can make a tarball of it.
From another computer, mount your rootfs and become root...
Code: Select all
sudo su
cd /media/path_to_rootfs
tar -cvzf /home/user/whereyouwantyourbackuptobe/rootfs.backup.date.tar.gz ./
apowell656
 
Posts: 37
Joined: Fri Jan 25, 2013 1:24 am

Re: Assistance Needed - Simple backup and restore procedures

Postby apowell656 » Thu Feb 14, 2013 4:51 pm

Yes, my follow question was stupid. Google led me to steps to complete this from my Mac.

- Andre
apowell656
 
Posts: 37
Joined: Fri Jan 25, 2013 1:24 am


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 1 guest

cron