Results 1 to 5 of 5

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Full backup of touch using Unix tar command

  1. #1
    Default Full backup of touch using Unix tar command
    Copying the entire structure of the file system on the pod requires
    command-line Unix. I could suggest using an FTP UI-intense client but
    what they do is sometimes too opaque for my tastes. There are too
    many symlinks and so on that throw the system, and on top of that,
    there seem to be a total of 3 mounts in the system. What I want to do
    it get the entire thing over in one backup file. Enter the "tar"
    command.

    Here's what I did and it seems to have worked for me. Caveat: I have
    NOT tried to restore this backup file to any pod. I have no idea of
    doing so will restore it exactly to the state it was in when the tar
    was executed. I doubt it would be possibly frankly since as the OS is
    running, files are getting modified, even if you execute tar and leave
    the pod alone til it's done.

    Anyway, here is what I did:

    1. Opened Putty and connected to the pod
    2. cd /
    3. pwd (to make sure I am at /)
    4. cd var
    5. mkdir TARBACK
    6. chmod 777 TARBACK
    7. cd /
    8. tar cfz /var/TARBACK/backup.tar.gz /
    [ -- take a look: http://www.math.utah.edu/docs/info/tar_3.html#SEC36
    ]
    [ -- can also add an ampersand at the end of that line if you want
    to background the tar
    process; see http://heather.cs.ucdavis.edu/~matlo...ocesses.html#t...
    ]
    [Note I am gzipping this whole thing too, with the 'z' parameter.
    I wouldn't try to just tar all
    these files without gzipping them as well. Another thing to look
    out for: if you do this remem-
    ber you are creating the backup file on the pod itself. So it
    needs to have the diskspace
    necessary to hold the backup file. Caveat I would say is to make
    sure you have as much
    on /var as you have taken up with all your files on both / and /
    var. Go to BossPrefs and
    touch "More" and then "Show Free Disk Space" to make sure you have
    the room. You can
    get this info too in a Unix term by using df -k (see
    http://en.wikipedia.org/wiki/Df_(Unix) )]
    9. Took about 15-20 mins for it to run. When I was done, I had a ~660
    MB tar-gzipped file at /var/TARBACK.
    10. I ftp'd the file back to my PC for safe-keeping. I opened it in
    some zip-reader (can't remember which one it was-- I have like 3 on my
    home PC) and checked for completeness. It looks like it got the /var
    directory no problem but also tried to add itself to the file! And it
    did, some part of itself anyway. So I learned here to add an exclude
    of that file to the command for next time. See:
    http://www.math.utah.edu/docs/info/tar_6.html#SEC64
    11. Now I am running tar to check/compare to the current system. The
    command is:
    tar -d /var/TARBACK/backup.tar.gz /
    [ What I actually ran was this:
    tar -d /var/TARBACK/backup.tar.gz / > tardiffs.txt
    This way the diff report goes to tardiffs.txt ]
    [ See http://www.math.utah.edu/docs/info/tar_4.html#SEC54 ]

    That's where I am at. So I'll see what the diff output looks like
    when it's done. But the fact that the tar command completed with no
    errors and that the symlinks were tarred w/out incident is well is a
    very good sign.

    I tested this approach first, btw, by running these commands not on
    the entire files ystem (/) but on /bin. It seemed to work OK for /bin
    so I decided to just go for it. So far it seems to have worked.

    Now may I never have to try to restore a pod with such a file. I
    suppose I could experiment by taking another pod and starting from
    jailbreak, up the backup file to / and then un-tar everything to /. I
    wonder how that would go, as I try to overwrite currently-open system
    files, etc.

    This is why this method of backing up the entire pod file system does
    not fill me with 100% confidence. But I do know all my pref and media
    content files are now backed up and I pretty much have a full listing
    of all the apps I have on the pod (this btw would be a real neat tool
    to have-- an installed app that lists all the apps you have and their
    prefs. Maybe this is my next project, dunno). But at least now I can
    go in and extract stuff if I need to and upload it or replace things
    on a file-by-file basis if I think I need to later.

    Anyone else try this approach to a full pod backup?

    http://groups.google.com/group/rochesteriphoneusers

  2. #2
    Wow...

    I can't imagine i'd ever be able to use that, but i applaud you for it!
    Depending on the data you're trying to backup, you could always use pwnage or winpwn to create an ipod firmware file that already contains all of your apps. But i'm not sure if you would be able to back up music and other files with that...

    I'd be intrigued to see if the backup would successfully copy back onto the iPod. How would you do that without wiping it first?

  3. #3
    Default Would need a second unit
    I'd be curious, too.. I guess you'd need a second unit to exshhhperiment with if you didn't want to blast your one hard-fought-to-setup unit.

  4. #4
    Ah, true.

    hehe.. any volunteers?

  5. #5
    if you try it try it on the ipod you backed up because some specific information such as the serial number might screw up the firmware and youd have to restore.
    and the worse thing that could happen is you have to restore
    there are 10 kinds of people in this world:
    those who understand binary and those who don't

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •