Active Topics

 


Reply
Thread Tools
dfinch's Avatar
Posts: 362 | Thanked: 82 times | Joined on Jan 2008
#21
Originally Posted by TA-t3 View Post
It could be that it's blocking due to output from the command. Try removing the 'v', i.e.

tar cf /media/mmc1/gvm-backup.tar .gvm

(that'll make the command silent, unless there are errors)
Interesting. I presume that 'v' is verbose mode? ie: report everything.

I did actualy get it to work by adding the path to the .gvm. I don't see any output of course but it's probably better (and maybe slightly quicker) to leave the v out.

I wonder if there is a slick way to pop up a 'completed' confirmation?

FYI if you have the target folder open in file manager, you can see the file size increase while it runs.
__________________
N810, OS 2008 5.2008.43-7 (Diablo)
Nobody can accuse me of not contradicting the invalid arguments of the opposition!
Derek
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#22
'v' is verbose mode. But it sounds like the real problem was that when osso-statusbar executes a command it doesn't do it from the $HOME directory. That's easily sorted out by specifying the full path, as you just did.

But I'm a bit worried about what happens when you try to restore the .gvm directory from a similar command. The tar file will not include the leading '/', even if you specify it, so a 'tar xvf' (or 'tar xf') to restore will try to unpack _in place_, which will be wherever osso-statusbar launches the command from. Say it is from /home/user/.osso-statusbar-workdirectory (I'm making that one up), it'll unpack the tar file as /home/user/.osso-statusbar-workdirectory/home/usr/.gvm, which is not what you want.

I think the safest way then is to create two scripts, one for backup, the other for restore. Example of backup script:
Code:
#!/bin/sh
cd /home/user
tar cf /media/mmc1/gvm-backup.tar .gvm
And for restore:
Code:
#!/bin/sh
cd /home/user
tar xf /media/mmc1/gvm-backup.tar
Give them names, e.g. backup-gvm.sh and restore-gvm.sh, put them somewhere (e.g. /home/user), and execute the scripts from osso-statusbar (either with 'sh /home/user/backup-gvm.sh' or withouth the leading 'sh' in case you have done 'chmod a+x' on the scripts. Likewise for the restore script.)
I wonder if there is a slick way to pop up a 'completed' confirmation?
There's probably many ways to pop up a message. But load-applet-run (which I use instead of osso-statusbar) pops up a window by itself, where it says 'Command completed with exit code 0' (if OK, or code 1 if not OK).

EDIT: Added the part about using scripts.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.

Last edited by TA-t3; 2008-08-28 at 10:47.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
dfinch's Avatar
Posts: 362 | Thanked: 82 times | Joined on Jan 2008
#23
Thanks TA-t3, I also wondered about the restore working. I hoped that perhaps it acquired the full path during backup and so would place it back in the correct place.

I think this would be a great exersise for me to dig a bit deeper and try the scripts you posted.

I have used chmod +x to create executables but what is a+x? will the +x suffice?

I have looked around for load-applet-run and it doesn't appear to be a native app or installable. Can you give a link to this?

Thanks for your excellent tutorials!
__________________
N810, OS 2008 5.2008.43-7 (Diablo)
Nobody can accuse me of not contradicting the invalid arguments of the opposition!
Derek
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#24
+x will suffice, a+x is just 'all'+x, i.e. user/group/other execute bits. It doesn't matter, as there are only two users: Root and user.
(there's +x, u+x, g+x, ug+x o+x, and ugo+x (which is the same as a+x. +x is the same as u+x.) You can see what's set with 'ls -l filename'

I hoped that perhaps it acquired the full path during backup and so would place it back in the correct place.
That would have worked with the old SysV tar program (as found on some Unix systems), but GNU tar as well as the NIT busybox tar will strip off the leading '/' character, if you specify one. Thus, you can't store absolute paths in the tar file (this is meant to be a security feature).
Example:
Code:
$ tar cvf etc.tar /etc/hosts
tar: Removing leading `/' from member names
/etc/hosts
$ tar tvf etc.tar
-rw-r--r-- root/root      1081 2008-04-30 13:35 etc/hosts
$
As you can see it stores "etc/hosts" and not "/etc/hosts" in the tar file. Thus, tar xvf etc.tar would create the etc/hosts directory/file in the directory I happen to be in, it wouldn't restore it to /etc/hosts (unless I did a 'cd /' before tar xvf)

load-applet-run is an applet I found for my OS2007 setup, I believe it used to be available for OS2008 as well.. but I can't find it anymore. Only old versions.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
dfinch's Avatar
Posts: 362 | Thanked: 82 times | Joined on Jan 2008
#25
TA-t3, I have completed all the steps (with a slight variation) and the backup does not work. (I tried from the osso-statusbar app and from xterm).

The difference is where I located the scripts. I decided for neatness to create a folder under MyDocs called scripts. No leading period. I chmod +x the scripts (named as suggested) and got no error (or confirmation). In xTerm in the folder scripts it will not execute the command (backup-gvm.sh) - it says not found.

I'm guessing it is related to the path and the 'scripts' folder is not in the predefined paths. Can I add this folder to be recognised (if this is the problem) or is there something else I need to do? Thanks.
__________________
N810, OS 2008 5.2008.43-7 (Diablo)
Nobody can accuse me of not contradicting the invalid arguments of the opposition!
Derek
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#26
You should be able to add that path to the standard path by editing (if necessary creating) a file .profile (dot profile) in your home directory.
Add a line like this:
Code:
PATH=$PATH:/home/user/MyDocs/scripts
(After that you'll have to reboot your device)

Or, you can instead simply specify the full path to your scripts:
/home/user/MyDocs/scripts/name-of-script.sh
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
dfinch's Avatar
Posts: 362 | Thanked: 82 times | Joined on Jan 2008
#27
I think I must have some other issue because I can't execute the any script.sh even using the full path. I tried within the scripts folder and from MyDocs and each time it says file not found. I have been very careful checking spelling and syntax of the path and see no errors. I've also tried several times.

To make them executable, in xTerm I did:
chmod +x script-name.sh

The script-name.sh was created on my Win XP machine with EditPad Lite (saved with .sh append) and transferred wirelessly using N810 file manager. Sound ok so far?

I used your three line script verbatim (from # to tar) except I changed mmc1 to mmc2 as I have plenty of space internally right now (incredible, I know!!!).

BTW, I tried to create .profile but was denied permission. I presume I can do this after gaining root? (and reboot will release root privaleges?). Is this possibly a hidden file if it exists now? will ls -a reveal it if it exists (if I am in the correct location)?

I tried to create the .profile file with:
type 'some text' > .profile
('some text' is the path statement of course).
I know I could use vi but currently have zero experience so thought the redirection was simple enough.

So, any thoughts? And thanks again. (I'll have to give you my address so you can send me a bill!!)
__________________
N810, OS 2008 5.2008.43-7 (Diablo)
Nobody can accuse me of not contradicting the invalid arguments of the opposition!
Derek
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#28
You should be able to create .profile as user, no root access necessary. Specifically, it's /home/user/.profile, make sure that you didn't do e.g. 'cd /' or something before trying to edit it. Just launching xterm should land you in /home/user, as can be checked with
Code:
pwd
ls -ld
It should output something like

/home/user

and

drwxr-x--- <some number> user users <some date>

which means that you're in /home/user, which is owned by 'user' in the group 'users', and with write access for 'user' (yourself) (that first 'w').

As for the script execution:
It fails with 'MyDocs/scripts/script-name.sh' ?
Does it work with 'sh MyDocs/scripts/script-name.sh' ?
Does 'sh -x' instead of just 'sh' make some output?
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
Posts: 10 | Thanked: 1 time | Joined on Jun 2008
#29
Hi,
no solution to your +x and the other shell problems... my solution to the original problem looks like this.

I did the following to save my gvm.store file because I had the same problems in past. I've installed "personal menu" and created an entry for backup of my palm file (see below). It copies the file to sd card and give it a timestamp. I use this from time to time, especially after installing new palm-progs and sometimes I remove old copies. The palm gvm should be down if you start the backup-copy. If the gvm crashes and has deleted all my apps, I create a new vm with gvm (with 64MB RAM and the other parameters), start the vm and stopp it. Then I manually(!) copy the backup file to ~user/.gvm/gvm.store

I only need two taps for an backup!
Thats all and it runs perfectly for me.

Here's the entry of ~user/.personal_menu.rc

Code:
[21]
app name=gvm.store
icon name=qgn_list_backup
executable=/bin/cp  /home/user/.gvm/gvm.store /media/mmc1/AKeg_downlod/gvm.store.`date +%Y%m%d%H%M`  ; echo fertig mit gvm.store.`date +%Y%m%d%H%M`
run as root=false
run in term=true
service=
Additionaly I start the palm directly over 'personal menu', the entry look like this (ZLCR is zlauncher). It's very fast(I guess about 4-5sec. for complete VM) to start an app directly via such a command line:

Code:
[0]
app name=PalmOS
icon name=garnet-vm
executable=/usr/bin/gvm/gvm --hotsyncid=keg:12345 --dynheap=2048 --storageheap=64 --rotated=no --zoomFactor=1  --appcreator=ZLCR --bgimage=/usr/bin/gvm/gvm_bg.jpg
run as root=false
run in term=false
service=
Only a little note ...
Klaus

Last edited by zonki; 2008-09-03 at 16:22. Reason: corrected a wrong sentence
 

The Following User Says Thank You to zonki For This Useful Post:
dfinch's Avatar
Posts: 362 | Thanked: 82 times | Joined on Jan 2008
#30
Originally Posted by TA-t3 View Post
You should be able to create .profile as user, no root access necessary. Specifically, it's /home/user/.profile, make sure that you didn't do e.g. 'cd /' or something before trying to edit it. Just launching xterm should land you in /home/user, as can be checked with
Code:
pwd
ls -ld
It should output something like

/home/user

and

drwxr-x--- <some number> user users <some date>

which means that you're in /home/user, which is owned by 'user' in the group 'users', and with write access for 'user' (yourself) (that first 'w').

As for the script execution:
It fails with 'MyDocs/scripts/script-name.sh' ?
Does it work with 'sh MyDocs/scripts/script-name.sh' ?
Does 'sh -x' instead of just 'sh' make some output?
Havent tried the first part yet but executing the backup in the ways you suggest gives the same response = can't open path/script-name.sh

so it seems to find it but cant execute.

Just typing in the file with path still says 'not found'

can I prove that they are executable?
__________________
N810, OS 2008 5.2008.43-7 (Diablo)
Nobody can accuse me of not contradicting the invalid arguments of the opposition!
Derek
 
Reply

Tags
garnet, palm


 
Forum Jump


All times are GMT. The time now is 01:46.