Backup Android on SD card

User discussion and information resource forum for Image products.
Post Reply
sp_in_mo
Posts: 4
Joined: Wed Apr 18, 2012 3:56 pm

Backup Android on SD card

Post by sp_in_mo »

I tried to backup an installation of Android 2.3 that I have on a Sandisk micro SD card. I'm using a recent version of Image of Linux GUI, booting from a CD.

I didn't have any great expectations of success, so I didn't write down all of the parameters that I used to make my backup. I basically checked the first box when I got to the source drive, the mounted SD card, which in turn checked the four partitions on my source drive.

The source drive was a 4GB Sandisk micro SD card, class 4. The target drive was an 8GB drive of the same specifications.

I got an error message during the copy process that indicated that I should do a file check after the backup was complete.

When the backup finished, I put the 8GB target SD card in my Android tablet, and it booted from the new "hard disk" without any problems. But when I tried to access a data directory, I got a message indicating that the files did not exist.

I then mounted each of the two micro SD cards in turn using the help of a Linux Live CD on my desktop, and below is a summary of the partition table of each.

Source 4GB SD card.

/dev/sdb1 fat32 117.63 MIB flags--boot.lba
/dev/sdb2 ext4 462.81 MIB
/dev/sdb3 ext4 964.84 MIB
/dev/sdb4 fat32 2.18 GIB flags--lba

Target 8GB SD card

/dev/sdb1 fat32 235.72 MIB flags--boot
/dev/sdb2 ext4 927.86 MIB
/dev/sdb3 ext4 964.84 MIB
unallocated remainder of 8GB

I apologize for not taking notes of my backup parameters. I can easily go back and write down all of my choices and the specific error messages--the whole backup and restore process took less than 10 minutes.

But given the above information, and the fact that the boot partition and application files all seem to function on the target SD card, do you have any suggestions on what settings I might use on another backup attempt to get a more successful backup. Might I have more success using an identical 4GB SD card for my target drive.

Thanks so much.
TeraByte Support
Posts: 3598
Joined: Thu May 05, 2011 10:37 pm

Re: Backup Android on SD card

Post by TeraByte Support »

you probably used scale to target which is why you have free space on the
target. But why you only have three, you'd have to send the .log to see
that it did copy them all and no error, you can save it before rebooting by
mounting a partition somewhere and copying the ifl.log to it.

"sp_in_mo" wrote in message news:2075@public.image...

I tried to backup an installation of Android 2.3 that I have on a Sandisk
micro SD card. I'm using a recent version of Image of Linux GUI, booting
from a CD.

I didn't have any great expectations of success, so I didn't write down all
of the parameters that I used to make my backup. I basically checked the
first box when I got to the source drive, the mounted SD card, which in turn
checked the four partitions on my source drive.

The source drive was a 4GB Sandisk micro SD card, class 4. The target drive
was an 8GB drive of the same specifications.

I got an error message during the copy process that indicated that I should
do a file check after the backup was complete.

When the backup finished, I put the 8GB target SD card in my Android tablet,
and it booted from the new "hard disk" without any problems. But when I
tried to access a data directory, I got a message indicating that the files
did not exist.

I then mounted each of the two micro SD cards in turn using the help of a
Linux Live CD on my desktop, and below is a summary of the partition table
of each.

Source 4GB SD card.

/dev/sdb1 fat32 117.63 MIB flags--boot.lba
/dev/sdb2 ext4 462.81 MIB
/dev/sdb3 ext4 964.84 MIB
/dev/sdb4 fat32 2.18 GIB flags--lba

Target 8GB SD card

/dev/sdb1 fat32 235.72 MIB flags--boot
/dev/sdb2 ext4 927.86 MIB
/dev/sdb3 ext4 964.84 MIB
unallocated remainder of 8GB

I apologize for not taking notes of my backup parameters. I can easily go
back and write down all of my choices and the specific error messages--the
whole backup and restore process took less than 10 minutes.

But given the above information, and the fact that the boot partition and
application files all seem to function on the target SD card, do you have
any suggestions on what settings I might use on another backup attempt to
get a more successful backup. Might I have more success using an identical
4GB SD card for my target drive.

Thanks so much.

sp_in_mo
Posts: 4
Joined: Wed Apr 18, 2012 3:56 pm

Re: Backup Android on SD card

Post by sp_in_mo »

Thanks for your answer.

Could you give me a little help with the command line instructions for mounting the linux drive, and where to look for the log file. I'm assuming that three devices were mounted when I did my backup, SDA1--my main Windows hard drive, sdb (1-4)--the SD card, and something like SR0 (I don't remember what the CD's are called) for the CD drive that I booted Image for Linux from.

Is there a virtual file system where IFL 'lives' once it boots from the CD. I'm sure that once I can find the log file I can just use the 'cp' command to copy the log file to a folder on /dev/sda1 .

Thanks again.
TeraByte Support(TP)
Posts: 305
Joined: Wed Aug 31, 2011 4:22 pm

Re: Backup Android on SD card

Post by TeraByte Support(TP) »

On 04/18/2012 06:06 PM, sp_in_mo wrote:
> Thanks for your answer.
>
> Could you give me a little help with the command line instructions
> for mounting the linux drive, and where to look for the log file. I'm
> assuming that three devices were mounted when I did my backup,
> SDA1--my main Windows hard drive, sdb (1-4)--the SD card, and
> something like SR0 (I don't remember what the CD's are called) for
> the CD drive that I booted Image for Linux from.
>
> Is there a virtual file system where IFL 'lives' once it boots from
> the CD. I'm sure that once I can find the log file I can just use
> the 'cp' command to copy the log file to a folder on /dev/sda1 .
>
> Thanks again.
>
>

To copy the log file to /dev/sda1, you'll need to mount it first, since
nothing gets mounted automatically when you boot into IFL.

To mount /dev/sda1 (assuming it's NTFS):
ntfs-3g /dev/sda1 /mnt

To copy the log file to the root of /dev/sda1:
cp /tbu/ifl.log /mnt

To unmount /dev/sda1:
umount /mnt

When you boot back into Windows, you'll find ifl.log in the root
directory of your C: drive (assuming /dev/sda1 is your C: drive).

--
Tom Pfeifer
TeraByte Support
sp_in_mo
Posts: 4
Joined: Wed Apr 18, 2012 3:56 pm

Re: Backup Android on SD card

Post by sp_in_mo »

Tom,

For some reason I could not mount my NTFS partition, but I was able to mount a second FAT32 partition, just using the 'mount /dev/sda2" syntax.

I did a new backup, and DID NOT choose the single check box when presented with the source device/partitions, but instead chose my four partitions, individually.

The backup and restore proceeded without any error messages. Here is the restore log:

[ 4/18/2012 10:37:50 pm] Image for Linux 2.68
[ 4/18/2012 10:37:50 pm] Starting ...
imagel --r --d:l1@0x80,0x80,0x80,0x80 --f:l0@0x1:"/Downloads/cm7-android-2nd-try" --sp:0x1,0x2,0x3,0x4
[ 4/18/2012 10:37:50 pm] Restoring: boot Partition (01) 118 MiB FAT-32
[ 4/18/2012 10:37:50 pm] To: Drive 1 - Partition (80) 7578 MiB Free Space
[ 4/18/2012 10:37:50 pm] From: l0@0x1:/Downloads/cm7-android-2nd-try.tbi
[ 4/18/2012 10:37:50 pm] Restoring: MBR 1 Partition (02) 463 MiB Linux Native
[ 4/18/2012 10:37:50 pm] To: Drive 1 - Partition (80) 7460 MiB Free Space
[ 4/18/2012 10:37:50 pm] From: l0@0x1:/Downloads/cm7-android-2nd-try.tbi
[ 4/18/2012 10:38:29 pm] Restoring: MBR 2 Partition (03) 965 MiB Linux Native
[ 4/18/2012 10:38:29 pm] To: Drive 1 - Partition (80) 6997 MiB Free Space
[ 4/18/2012 10:38:29 pm] From: l0@0x1:/Downloads/cm7-android-2nd-try.tbi
[ 4/18/2012 10:39:03 pm] Restoring: CM7 SDCARD Partition (04) 2236 MiB FAT-32
[ 4/18/2012 10:39:03 pm] To: Drive 1 - Partition (80) 6032 MiB Free Space
[ 4/18/2012 10:39:03 pm] From: l0@0x1:/Downloads/cm7-android-2nd-try.tbi
[ 4/18/2012 10:39:07 pm] Operation Completed with Error Code 0
[ 4/18/2012 10:40:37 pm] Stop

However, when I actually examined the new "drive", the target SD card, the 4th partition, formatted with FAT32 for data, was a few KB smaller than the source partition on the 4GiB drive (SD card). And three folders were "missing", "Android", Download", and "Kindle", and in there place were folders named FSCK001.REN, FSCK002.REN, and FSCK003.REN. A file named Samba-support-log.txt was renamed FSCK004.REN--but the contents of that latter file does look like a Samba log file.

Does it just look like a might have a flaky SD card as my target drive, or are there some parameters that I might change before my backup or restore that might help prevent these files from being corrupted.

Thanks again for your assistance.
sp_in_mo
Posts: 4
Joined: Wed Apr 18, 2012 3:56 pm

Re: Backup Android on SD card

Post by sp_in_mo »

Tom,

The only parameter I check on the restore options was to create a log file.
TeraByte Support(TP)
Posts: 305
Joined: Wed Aug 31, 2011 4:22 pm

Re: Backup Android on SD card

Post by TeraByte Support(TP) »

Have you done a file system check on that FAT32 partition (the 4th partition) on the source drive? I'd suggest doing that BEFORE doing the backup to ensure that the file system is OK beforehand. Then I'd select "Entire Drive" when backing up and restoring (as you did originally), but leave all other options at defaults, and see what the results are.
Post Reply