Introducing OpenSim Inventory Archives (IARs)

Monday, September 14, 2009
By justincc

(Updated Thursday 24th September 2009) - IAR load and save works again on grid mode again as of revision e1abc3 (also on this day)).  However, the user service also needs to be of this revision or later.

(Updated Friday 18th September 2009 - unfortunately it turns out that the added password requirement stops load and save iar working in grid mode.  A fix will come soon).

(Updated Tuesday 15th September 2009 since load iar and save iar commands also need the user’s password as of Git revision c5455d4 on the same day).

Some time ago I mentioned that I was working on a feature for OpenSim known as Inventory ARchives (IARs).  Well, after a longer period than I would have liked, this facility is now available on an experimental basis in the latest bleeding edge OpenSim code.

What is an IAR?

The short answer is that an IAR is the inventory equivalent of an OpenSim ARchive (OAR).

The long answer is that inventory archives are a way of saving selected inventory folders and items to an external file.  This file can then be reloaded later on or given to somebody else to load onto a completely different installation of OpenSim.  The IAR contains all the data necessary to fully restore the items, including textures, scripts and other contained assets.

The IAR facility isn’t intended to supplant tools such as Second Inventory, which extract and restore objects via the client interface.  Rather, it exists as a way for region owners (whether standalone or on a grid) who have access to the region console to backup and transfer inventory.

IAR is also a something of a rough and ready format.  Like OAR, it relies on undocumented object serializations.  It will also itself be subject to considerable evolution in the future.  Nonetheless, I intend that IAR formats will be backward compatible - IARs saved now should remain loadable into future versions of OpenSim.

How do I use an IAR?

IARs are loaded and saved from the region console, just like OARs.  Before doing any loading or saving, you have to be logged in to a region served by the region simulator.

Let’s run through an example.  Suppose that you have an inventory structure like so

and you want to save the contents of folderA to an IAR.  On the region console command line you would issue the command

save iar Justin Clark-Casey folderA userpassword

with your own avatar name and password instead of mine, of course :)  This would save folderA and its descendant folders to a file called user-inventory.iar.  If you want to specify a different filename then you can add it to the end of the command, for example

save iar Justin Clark-Casey folderA userpassword my-great-items.iar

If you need to specify a folder or item containing spaces, then you’ll need to surround the path with quotes (e.g. “Folder A” or “Folder X/Folder Y”).

Having saved the IAR, you decide that you’d like to make your items available to the world so you put the file on a website.  John Does comes along and thinks that your items sound really interesting, so he downloads the IAR to the bin/ directory of his own OpenSim installation, starts OpenSim up and logs in.

Now, let’s suppose that John has an inventory structure like this

and he wants to load the IAR into folderY in folderX.  To do this he issues the command

load iar John Doe folderX/folderY userpassword my-great-items.iar

on the region console.  After a short delay the items appear in his inventory ready for rezzing!

Example IAR

Here’s an example IAR (containing the inventory folders and items described above) that you can download and load into your own bleeding edge copy of Git-fresh OpenSim (since revision 5a64ca on 14th September 2009).  If you’d rather not suffer the pain of the bleeding edge, then the load and save IAR commands will be active in the next OpenSim release (which should be 0.6.7).  Load and save IAR commands are present in OpenSim 0.6.6 but they were not complete in this version and do not work properly.

Final Notes

The load and save IAR feature is currently experimental.  Bug reports and suggestions for improvement are welcome!  The best place for bug reports is OpenSim’s Mantis system and the best place for suggestions right now is as comments on this blog post.  Thanks!

There is also some more information on the load and save iar commands on the opensimulator.org IAR page.

Next time…

On my next post (hopefully coming soon), I’m going to talk about some of the current limitations of the IAR implementation and what can be done about these in the future.

One thing that I do want to mention right now is that due to technical limitations item creator names are not preserved unless a profile for that name exists on the target OpenSim system.  I’ll write some more about this problem (and suggestions for overcoming it) on my next IAR post.

19 Responses to “Introducing OpenSim Inventory Archives (IARs)”

  1. That’s really fantastic news! :-) Even the limitation of having a restore of “save oar John Doe / file.iar” creating spurious base folders can be overcome with some few minutes of work. Now we’ll be able to have a backup of our inventory in a pendrive, alongside with the .oars for the regions :-)

    #622
  2. Justin–xlent. On the creator name point…we are making a registry for creator names to support builderbot (which I guess could also make IARs). I suppose you could use that in the IARs to maintain that field?

    #656
  3. LaurentAkina

    I have tried the iar command in a fresh instance of OpenSim (trunk) but nothing append after. Nothing in my bin folder.

    My command is right ; save iar Laurent Akina AkinaInventory AkinaInventory.iar

    I got the message in console : saving archive user-inventory.iar from inventory path AkinaInventory for laurent akina

    What is wrong ?

    #657
  4. @rightasrain - yes, this is the kind of thing that I’ve been thinking of, albeit so that user profiles can originate from anywhere on the web. I hope to write more about this soon and conversation about that would be very welcome.

    @LaurentAkina - So you don’t see any log messages at all? You really do need to be at the very latest OpenSim revision for this (now c5455d4 today which adds the password requirement). If you have further problems, please could you open a bug report at http://opensimulator.org/mantis - thanks!

    #664
  5. [...] Introducing OpenSim Inventory Archives (Justin Clark-Casey) Title say it [...]

    #691
  6. Tony

    @ justincc
    you are doing it wrong, try
    save iar Laurent Akina AkinaInventory

    and then in your OpenSim folder it will be saved as

    user-inventory_iar.tar.gz

    i then just rename it tony something like tony.iar then can load it on another opensim real easy.

    Thanks to justinc for this, it really is a great addition to opensim.

    #694
  7. [...] Introducing OpenSim Inventory Archives (IARs) [...]

    #698
  8. @Tony - it looks like you are using the load and save iar commands in an older version of OpenSim (0.6.6 or previous). The command format is slightly different but they may work just fine.

    #699
  9. Tony

    oops sorry!
    I do have version 0.6.6 yes but thats all i can see on the website :-(

    #721
  10. [...] made save and load Inventory Archive (IAR) commands available to users.  “save iar” on the region console saves user inventory, [...]

    #824
  11. [...] week I blogged about the new experimental Inventory Archive (IAR) format in OpenSim.  This week I want to explore how much content creator information it preserves and how [...]

    #1016
  12. [...] Foram introduzidos de forma experimental “arquivos de Inventario” (IAR). [...]

    #1310
  13. Karen Palen

    Just tried out your IAR and it works great with OpenSim Diva-r11651, Linux/Ubuntu 9.10!

    A couple of minor problems:

    1) If the syntax of the load iar or save iar is incorrect the command line never gets onto the Gnome Terminal scrollback stack. This is not a feature in Windows command line mode, but it is a very useful feature for someone like me who has to make several tries to get the entire line typo free!

    2) The save iar identified 12 files with missing components, but did not appear to name them anywhere! I suspect that these were objects in which I accidentally deleted the texture files (OOPS!). The Clothing directory which I dumped already has 440 files in it, so it sure would be nice to identify any bad files so they can be fixed.

    #2871
  14. @Karen - many thanks for the feedback :) Just to echo the reply I gave on the mailing list..

    1) Yep, this is an issue that’s annoyed me too :) I’m sure this could be tweaked so that exception causing commands are still saved in command history. Of course, if anyone else wants to make a patch… :)

    2) Good idea. Unfortunately, it’s not a straightforward fix since only missing asset uuids are currently saved but it would be a helpful thing to have.

    #2875
  15. WhiteStar Magic

    Some further thoughts on IAR to ponder.

    What I see as outlying issues: (thinking out loud)

    A) Is the attachment / dependency to the scene.
    - A method of generating the IAR without having to have the avatar standing on the region… IE a Late Night Backup could be run from Console Command / Script such as command-script IARbackups.txt which could have A, B, C avatar Inventories backed up to IAR ??? without them being parked on the region.

    B) A method by which an IAR can be password locked, so if Joe Avatar can do an IAR on a designated server they should be able to password it. Maybe an osFunction that would grab the In-World userid/UUID and request a password on touch and excecute the dump ? Optionally request a password for the actual IAR file itself.

    C) a possible method to transfer said generate IAR from the server to another system by some means, either website or archive system. That could be ugly and likely not possible as they can get mighty big might fast. But the idea of transfering teh IAR to another designated destination/path like a Cloud Storage system or other service/server may be a good avenue for maintaining an archive/backup.

    I think this is essential in large part, as Inventory and Assets are a key point issue in this environment and we cannot depend on the potential of a single point of failure. We need to have backups and we need our stuff.

    In Closing, with the pending changes to Core, I feel the time is ripe to get a solid and stable way of using IAR for people. I am now generating IAR’s regularly to protect my materials.

    Thanks for Everything your doing Justin ! 150% Goodness!
    WhiteStar

    #3252
  16. @WhiteStar

    it’s possible to do A) already but it isn’t supported in the code due to various security concerns.

    B) could be done by scripting if suitable os functions were exposed

    C) I need to implement the same IAR web installation as for OARs. Uploading would be pretty neat as well, I agree.

    #3256
  17. WhiteStar Magic

    Thanks for the response Justin.

    In Regards to Item A) If I have My Password and my Alts Password then standing on a region to backup inventory should be no issue. The simple fact of having the password should be sufficent cause without the password you get no access to Avatar-X Inventory.

    Item B) would be a good Candidate for the proposed llTextBox function should it be available for capturing the requested info. The one osFunction I could think of, I would not want to have Pub Access for, you know the one… Maybe a subset of that ? particularly aimed at ONLY IAR generation ?? Just thinking out loud.

    Item C) Given recent events in OSG Inventory … no more needs to be said I guess.

    Thanks Justin, Hope your feeling better.
    WS

    #3267
  18. WhiteStar Magic

    Sorry, something else to Ponder in regards to IAR.

    IAR would be an excellent tool for bringing in Items that a person has obtained.

    Case Scenario: A Web Based Service similar to the old SLX type of systems. If a person could get an OAR and build a region, or get an IAR for an inventory item this would serve a HUGE Audience of people.

    IMO, would there be a way to facilitate the Importing of an IAR from an external area such as a Local HDD or WebSite Storage, much like how OARS can be pulled from a website ? Of course this would require some type of extended function to accomplish but I think it would be a major PLUS overall.

    Thanks in Advance for the consideration
    WS

    #3293
  19. @WhiteStar - Yes, this kind of IAR import from web is not complicated to do and it is something that I hope to put in soon(ish).

    #3310

Leave a Reply

About me

Hi, I'm Justin Clark-Casey, an OpenSim core developer and professional software engineer.

On the Linden Lab grid I go by the name of Lulworth Beaumont. On other grids I'm just plain old Justin Clark-Casey.

I'm currently working as a freelance consultant specializing in OpenSim. If you're interested in learning more then please read the Hire Me page. Thanks!

Twitter Updates

Posting tweet...

Powered by Twitter Tools