How do I create a backup of my pogo fs to a usb flash drive?

This forum is for all other ARMv5 devices

How do I create a backup of my pogo fs to a usb flash drive?

Postby gard » Tue Feb 07, 2012 3:19 am

Hi,

I am new to archlinuxarm and pogo. Thanks to all the contributors for the excellent articles and posts here!

I have archlinuxarm running on my pogoplug basic. It boots off a 40gb external USB hard drive. I would like to create a backup of its contents to a 4GB flash drive. I formatted the 4gb flash drive as an "ext3" partition on an ubnutu machine, but now the flash drive doesn't get mounted on my pogo. Below are the mount and partitions outputs:

$this->bbcode_second_pass_code('', '[root@alarm ~]# mount
/dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
/sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/run on /run type tmpfs (rw,nosuid,nodev,relatime,size=10240k,mode=755)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
none on /dev/pts type devpts (rw,relatime,mode=600)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
[root@alarm ~]#
[root@alarm ~]#
[root@alarm ~]# cat /proc/partitions
major minor #blocks name

31 0 131072 mtdblock0
31 1 14336 mtdblock1
31 2 116736 mtdblock2
8 0 39088896 sda
8 1 39086113 sda1
8 16 3910591 sdb
8 17 3910000 sdb1
[root@alarm ~]#
')

What should i do to have the USB flash drive mount successfully on the pogoplug?

Also, the 40gb drive that is the current boot drive for the pogo is rather old and I would feel better if I had a backup. How do I copy the contents of the 40gb drive (there shouldn't be anything else other than the archlinuxarm bare install, so I think its contents are only about 2.5gb or so) to the 4gb flash drive and be able to boot from that copy?

Thanks for any suggestions and help!
gard
gard
 
Posts: 5
Joined: Mon Feb 06, 2012 9:36 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby dinjo » Tue Feb 07, 2012 11:20 am

To copy files from olddrive to newdrive
cp -ar olddrive newdrive

You will need to change /etc/fstab to get the 4GB mounted, BTW it should mount on its own since Arch linux supports hot mount.
dinjo
 
Posts: 258
Joined: Mon Nov 28, 2011 5:59 am

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby Philoo » Tue Feb 07, 2012 3:46 pm

partimage http://www.partimage.org/Main_Page is in the repo.
I've yet to find out if it can backup the currently active partition. Since this is pretty much a front end for dd I *guess* it can.
If you can shutdown you pogo for the backup, your solution might just as well be to connect your hard drive as an external hdd to a linux workstation, and tar the [pogoplug] boot partition (hereby creating your very own rootfs.tar.gz)
Philoo
 
Posts: 102
Joined: Wed Aug 10, 2011 9:20 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby WarheadsSE » Tue Feb 07, 2012 3:47 pm

dd'ing a live rootfs is Bad Idea
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby Philoo » Tue Feb 07, 2012 4:02 pm

So far I've not been into trouble as long as
- no journaling was in use
- swap was deactivated
- the of file was on a different physical device from the if (usually a network share for me)

That's were partimage gets handy by doing gazillion safety and sanity checks and not letting you doing crazy stunts unless you really insist on it.

But granted, in this and most cases shutting down the pogo and doing the backup from a different computer / root is by far the safest (and might even be faster)
Philoo
 
Posts: 102
Joined: Wed Aug 10, 2011 9:20 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby WarheadsSE » Tue Feb 07, 2012 4:15 pm

With the ease of a rootfs extraction:
- backup /etc for your users, groups, configurations
- backup any data directories
- backup home directories.

Then it's as simple as stop all services, backup, restart services. And many don't even have to be stopped.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby gard » Wed Feb 08, 2012 3:42 am

Hi,

Thanks to all the posters. Your comments have been very useful.

I tried the following yesterday:

- cleanly shutdown the pogo
- disconnect the drive I am using to host the rootfs
- connect it to another Linux machine
- format a flash drive to ext3 with a single, primary partition
- "sudo cp -r <pogo_rootfs> <flash_drive>
- plug the <flash_drive> in to the pogo as the only drive
- power up pogo

The LED on the pogo remained flashing for ever. I could not ping or ssh to the pogo. It looked like it didn't finish booting.

I read in the install tab about extracting the rootfs from the tarball, that it had to be done while logged in as root and not with sudo. I copied over my rootfs with sudo; could that be causing the boot issue?

Thanks for your help!
gard
gard
 
Posts: 5
Joined: Mon Feb 06, 2012 9:36 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby WarheadsSE » Wed Feb 08, 2012 3:44 am

Yes. That is the exact problem.

sudo su
cp -ar ... ....
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby gard » Wed Feb 08, 2012 5:08 am

Hi there,

You were right, WarheadsSE. I copied the files to the flash drive after doing "sudo su" and now the pogo boots fine with that flash drive. Thank you very very much!

Now on to setting up samba, twonky ...

gard
gard
 
Posts: 5
Joined: Mon Feb 06, 2012 9:36 pm

Re: How do I create a backup of my pogo fs to a usb flash dr

Postby campigenus » Tue Feb 21, 2012 6:17 am

Can anyone see something wrong with this:

sudo tar -cvpzf /tmp/backup.tar.gz /path_to_where_the_pogo_USB_is_Mounted
~~~
"Good behavior is the last refuge of mediocrity."
- Henry S. Haskins
campigenus
 
Posts: 38
Joined: Tue Feb 21, 2012 6:00 am

Next

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 3 guests