OESF Portables Forum
Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: shadowkwarrior on February 22, 2004, 01:29:49 am
-
theres probably a easy way to do this, but my linux skills are somewhere around non-existant, so bear w/ me please. ive got my zaurus setup just like i want right now, going on a trip next week and was wondering if it was possible to dump everything in the ramdisk to cf, so if i mess it up i can flash from image on cf and restore what was on ramdisk this way i wont have to reinstall all my programs again, thanks
-
Without knowing what version Z you have I can only suggest NAND backup, but the backup/restore app on the C760 does pretty much what you want. NAND backup will backup everything in one big package (132 Mb for C760)
Stu
-
oops, im using a sl-5500 running tkc.rom2.0 alpha3, what is nand backup?. the thing is i wont have a computer with me, so i have to restore from cf and dont want to set up all the apps again. thanks
-
thats was me, forgot to login
-
nand backup is for the cxxx machines only.
I suppose you could do:
cd /mnt/cf
tar -cf ram_backup.tar /mnt/ram
gzip ram_backup.tar
But I don\'t know whether this even exists for you, nor do I know how easy it would be to write the data back.
You should be able to get away with backing up your /home/zaurus and /home/root directories and (depending on how the symlinks work) /etc and /opt
Isn\'t there a backup app on that ROM like there is on the Sharp ROMs?
Si
-
thanks, if i wanted to create a script for it would s work? and where do i put the script?
#!/bin/bash
su
cd /mnt/cf
tar -cf backup.tar /home/root
gzip backup.tar
exit 0
thanks again...maybe after messing w/ the zaurus for a while i\'ll actually learn linux :-p
-
Yeah that should work, but as you\'re using \'su\' I assume you run as \'zaurus\' normally. In that case there may be files in the /home/zaurus/ directory which you could do with saving. You\'ll also have to check that /etc and /QtPalmtop are actually subdirectories of /home/root otherwise you won\'t save much (you\'ll save the data files, but not the applications).
Probably best that someone who actually runs tkc advises you.
If you\'ve not got time for that, I\'d just take the ipks on your CF card and backup /home/<user>/applications and its subdirectories and possibly also some of the (possibly hidden) subdirectories directly under /home/<user> which contain other config data. Probably also worth backing up parts of /etc (for example /etc/ppp if you have dialup scripts).
Si
-
instead of
tar -cf backup.tar /home/root
i\'ll just use this
tar -cf backup.tar /home
tar -cf backup.tar /opt
but, the script doesnt seem to run, i have .sh associated w/ the terminal app, so it should work... can u enlighten me?
-
that was me again, hmm i suppose what i need is a script tutorial for zaurus, the one in the how to section didnt help as much as i would like.
hmm i tried to execute by typing /mnt/cf/backup.sh in terminal, but it just says \"backup: not found \"
#!/bin/bash
su
mkdir -p /mnt/cf/backup
cd /mnt/cf/backup
tar -cf home.tar /home/
gzip home.tar
tar -cf opt.tar /opt
gzip opt.tar
echo \"backup successful\"
exit 0
anything i did wrong?
-
Try this:
#!/bin/bash
su -c `
mkdir -p /mnt/cf/backup
cd /mnt/cf/backup
tar -cf home.tar /home/
gzip home.tar
tar -cf opt.tar /opt
gzip opt.tar
echo \"backup successful\"
exit 0
`
Let me know if this works.
JP
-
hmm, still not working for me :-( what do i have to do to run the script? in terminal i can just put backup.sh if thats the filename right? does the script have to be located anywhere specifically? i had it in /mnt/cf and /home/QtPalmtop/bin and tried to run from both, neither did anything
heres a screenshot if that helps ...
[img]http://www.skw.no-ip.org/download/scrn001.JPG\" border=\"0\" class=\"linked-image\" /]
-
Ok. I can only think of one more thing to try and thats to change #!/bin/bash to #!/bin/sh. What rom are you running?
Hope that works.
JP
-
hmm, nop. im running tkc.rom2.0alpha3 , is there a package i need to run shell scripts?
-
I don\'t think so. But I may be worng. I run the script on both my tck.rom1.0 and my OZ 3.3.5 and it ran on both. I have no idea what the problem is.
JP
-
hmm so weird... especially when it works if i just copy and paste script in manually...
-
Dump the su command and su before you run the script. I don\'t think that the busybox su can handle multiline commands.
Stu
-
\"hmm so weird... especially when it works if i just copy and paste script in manually...\"
That \"bad interpreter\" message is what I got when I tried to create a script with the built-in texteditor. It doesn\'t work. I then used a working script, ddeleted everything but the first line, saved it and that worked. After setting the permissions to execute! If you used the built-in editor and created from scratch, that may be your problem.
-
omg, it worked!!!!!!!! thank u!!!! wow i hate that stupid text editor now. is there anyway to start by scratch?
-
Use vi, or grab dos2unix from killefiz and run that on your Windows-ised text file/script.
Si
-
pico and nano are also available at zsi. I haven\'t tried nano yet but I\'ve always liked pico for small text files and edits and it works fine on the Z.
What I\'d like to see is a fixed textedit for the Z so that when I select \"open in text editor\", I get an editor I can use, and one that might have \'search\'...
-
BTW, try using the Backup/Restore applet on the Sharp ROM. It creates a tar file of everything in writable memory (except /var, if I remember correctly). It can write the tar file to either SD or CF. I use it all the time to backup my system & even have used it after ROM upgrades. Because it writes a tar file (but doesn\'t give the file a .tar extension), you can always grab a couple of files from the backup, if you need them.
-
ah, hmm ya ive tried that, but i tend to not trust it very much as the backup is usually ~150KB and i know ive put more stuff in there, right now w/ the script that backs up the /home directory my backups are ~25MB uncompressed, and ~4MB compressed, 25MB is because i have a 16MB swapfile (i install rest of apps to a SD card, but cant put /home on SD because my simpletech card screws up during resume, and i have no idea how to fix), theres probably quite a bit of stuff i didnt need to backup, but this way just about everything i can change is backed up and after i flash i can get all my settings and applications back in <5mins, alot faster than installing all the apps again and changing things to how i like it.
-
That\'s odd. I use the Sharp backup on my 5600. Although I can\'t understand the sysinfo memory readings at all (I install 2 megs of stuff, mem doesn\'t change, or by 10K), I supposedly have 15 to 17 megs of stuff loaded into ram. My backups now are about 21 megs. Looking through the tar, it sure looks like it backs up everything...