[Opensim-users] Running save oar from command line?

marcel verhagen marceled9 at gmail.com
Thu Aug 19 23:01:23 UTC 2010


The screen command works oki with opensim.

create a file /dir/name.script with the commands you want to execute in
opensim

for instance with the following 2 lines: (replace regionname with your
regionname)

change-region regionname
save oar regionname.oar

then you can execute the script in an opensim screen session with:

#screen -d -r opensim -X stuff "command-script /dir/name.script" && screen
-d -r opensim -X eval "stuff ^M"

You then could create a cron job with that line of code so there is created
a backup on a regular interval

----------
When you would wanna create an archive with all the backups in it you could
tar them up. The first create an archive with:

#tar cvf backup.tar regionname.tar

then create a make_backup.sh script. (with execute permission) with the
following 3 lines:

#!/bin/bash
tar rvf backup.tar regionname.tar
screen -d -r opensim -X stuff "command-script /dir/name.script" && screen -d
-r opensim -X eval "stuff ^M"


and put that script in a cron job, then everytime the old backup is added to
the tar archive before the new one is created.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20100820/357c8a56/attachment.html>


More information about the Opensim-users mailing list