Change font size
It is currently Tue Jul 17, 2018 11:31 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Backup a region in-world
PostPosted: Sat Aug 08, 2009 7:40 am 
User avatar

Joined: Sun Jul 19, 2009 5:11 pm
Posts: 8
This script performs region backup, when the prim containing the script is touched by the prim owner
The script requires OSSL function treat level set to Severe.
{L_ATTACHMENT}:
backupinworld.jpg
backupinworld.jpg [ 48.17 KiB | Viewed 3778 times ]

{L_CODE}:
//***** Backups the current region to OAR ********
//   - Current script may be activated by the prim owner 
//   - Requires OSSL functions treat level set to "Severe"


//file extension of the OAR file
string OAR_FILE_EXT= ".oar"; 

// FALSE will generate unique archive name ( based on the current time:  [regionname][datetime].[OAR_FILE_EXT])
// TRUE will overwrite the last arhcive (filename: [regionname].[OAR_FILE_EXT]
integer OVERWRITE_OLD_OARS = FALSE;


default
{
    state_entry()
    {
             
    }
   
    touch_start(integer num)
    {
        if(llDetectedKey(0)==llGetOwner())
        {
          string regionName = llGetRegionName();         
          llOwnerSay("Archiving region "+regionName);
          integer res = osConsoleCommand("change region "+regionName);
          if(res==FALSE)
          {
            llOwnerSay("Unable to execute commnand 'change region'");
          }
         
          string oarName = regionName+OAR_FILE_EXT;
          if(OVERWRITE_OLD_OARS==FALSE)         
          {
              string time = llGetTimestamp();
              list l = llParseString2List(time,":","");
              oarName=regionName+llList2String(l,0)+llList2String(l,1)+OAR_FILE_EXT;
          }
          res = osConsoleCommand("save oar "+oarName);
          if(res==FALSE)
          {
            llOwnerSay("Unable to execute commnand 'save oar'");
          }
         
         
        }
        else
        {
            llSay(0,"Access denied!");
        }
    }
}


Top
 Profile  
 
 Post subject: Re: Backup a region in-world
PostPosted: Sat Aug 08, 2009 9:28 am 
Site Admin
User avatar

Joined: Wed Jul 16, 2008 7:22 pm
Posts: 186
legacy_anakin lohner {L_WROTE}:
The script requires OSSL function treat level set to Severe

That is incredibly dangerous.

If you set OsFunctionThreatLevel to Severe in OpenSim.ini, you are giving everyone access to every single OSSL function, including osConsoleCommand().

A far better solution would be to leave the default threat level at a safe setting - VeryLow or Low - and enable access to osConsoleCommand() only for the region owner (and his or her alts, if desired).

You can do this by adding an Allow_osConsoleCommand line in the appropriate section ([XEngine] or [ScriptEngine.DotNetEngine], or both, depending on whether or not they're enabled):
{L_CODE}:
Allow_osConsoleCommand = 71c6bc08-a902-44bb-b47a-be64f570fc4c

(assuming 71c6bc08-a902-44bb-b47a-be64f570fc4c is the region owner's UUID)

To allow multiple avatars to access it, separate their UUIDs with commas:
{L_CODE}:
Allow_osConsoleCommand = 71c6bc08-a902-44bb-b47a-be64f570fc4c,572992d5-e08c-467f-8e2b-fe8c54c3bebc


Top
 Profile  
 
 Post subject: Re: Backup a region in-world
PostPosted: Fri Jul 14, 2017 5:47 am 
User avatar

Joined: Sun Apr 25, 2010 1:03 pm
Posts: 30
Location: Zierikzee, Netherlands
opensim devs changed the oar backup command to:
{L_CODE}:
dooarbackup "Region Name"

NOTE: Region Name between Quotation marks (")
so this is impossible to use within a lsl script
for oar name, you don't need to set date/time, autobackup does this allready...

_________________
{L_IMAGE}


Top
 Profile  
 
 Post subject: Re: Backup a region in-world
PostPosted: Sun Jul 16, 2017 9:00 pm 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 129
Location: Belgium / Brussels
dooarbackup != save oar (Autobackup != Archiver)
Sources: OpenSim Archives & OpenSim Autobackup

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net