OpenSim-to-Second Life Import, Export & Backup Notes
March 7, 2011The following are notes on exporting and importing your content to and from Second Life and OpenSim based virtual worlds and backing up your work. With recent news of some having problems in OpenSim grids with the whole import/export and backup processes, we decided to write a post with some hopefully useful tips.
Exporting from Second Life to OpenSim
First things first – exporting items which you, yourself, did not create is technically not possible and ethically wrong. If you have useful/enjoyable virtual content in SL which you want to use in other virtual worlds, we encourage you to identify the creator (right-click on the item > Edit> Creator Name) and contact them directly – ask them to consider re-creating their content for your purpose. It is not as simple as shipping a package from Paris to New York and it’s even less secure for both creator/shipper and receiver/shippee, so consider what makes it worthwhile for both you and the creator before you enter the discussion.
Alternatively, there are some very good Open Source resources – generally less developed, but useful if you have the time and skills to customise for yourself:
Creations: Three Guides in Byzantium
Shamblesguru’s OpenSim Resources
So, let us begin. To export content from Second Life, you’ll need a Third Party Viewer which supports the Export function. NB: You’ll want to use the same Viewer to Export, then Import; otherwise, you’re inviting rather abrupt crashes.
Log into Second Life using your Viewer, find the object you want to export and rez it out of your inventory. Right-Click> Pie chart menu> More> More again, then click Export. It may vary depending on the Viewer, but basically it creates an XML file on your computer that describes the object so it’s ready for re-assembly when you Import. This means it doesn’t physically copy the object – it writes down the dimensions of each prim and its location/linking with respect to other prims into the XML file. Try to make the lowest prim the root prim; otherwise when Importing you may find your object mangled, as it will try reassembling the object below ground.
Linden Lab does not allow the Export with Textures option, so each texture (of your own creation) will have to be on your computer to Import separately. When you Import an object you may see it textured, but others likely won’t. This is a case of your own computer loading images from cached memory. A good practice to get into is regularly clearing and re-loading your cache – a bit laborious, but it ensures accurate representations.
|
XML also does not allow for the import of the contents of a prim. Scripts which create functions for your objects will also need to be saved to your hard drive to be imported individually. |
|
Importing Into OpenSim
Getting an object into OpenSim is just a case of selecting the XML file from the Import menu. This will then start to rez basic prims as it reads the XML file. When it has got all the prims rezzed, it will then do the second stage of calculating individual prim sizes and relative positions, placing them into a linked object. (Kinda fun to watch!) By the way, it is a good practice to keep linksets to less than perhaps 200 prims each, to allow for machine calculation times. It’s best to not try moving, building or editing appearance while importing or you may bork the process. For large builds, think modularly. It’s also a good idea to name each object as you import and take a copy into inventory. Then it’s a matter of applying textures and adding scripts to the relevant prims.
Another side note on working with linked prims in OpenSim: Depending on your setup, you might find that your textures look fine until you log on again only to find the textures gone; likewise with cutting or editing prims in a linkset. It’s a pain, but a good practice for OpenSim, to unlink when you are editing a prim or swapping textures, then link again.
From OpenSim to Second Life
The same principles apply, with some key differences:
Preparing for Eventualities – Back Up!
Being an old fart and remembering DOS comes in handy for backup functions, but in this case it’s not vital, because WhiteStar Magic of OSGrid has written a batch (.bat) file. It’s not scary – really – you just have to put in your key info, such as the directory path to your os bin folder and where and what your SQLDatabase is called and its password. Then drop that script into the OS directory and run that instead of the OS.exe when you start up your grid. This will back up your DB and your ini files each time it starts up into a handy backup folder. That said – it’s good procedure to then copy that folder onto a different drive on a different pc or external drive just in case the worst happens.
To copy OAR files, you can also use this file to copy all your regions in OAR or various other formats. This is executed from the OS console, but it should be run whenever there’s any major change to your region, so you have a backup. It can take a while if you have a lot of regions, but it’s worth the wait for security and peace of mind.
So – if you just want to backup and restore your database manually:
Go to where your MySQL database is installed and open a DOS window, then type:
mysqldump -u DBname –databases loginname -p > mydump.sql
Swap the highlighted bits above with the name of your DB, ie., opensim and loginname with the name you gave to access your database, and the name of your backup file.
The easiest way to restore a database backup is go to your mysql console window and type:
use DBname source mydump.sql
If the database backup file is not in the same folder, you will need to add the path in front of mydump.sql (ie., c:/BACKUP/divadump.sql)
One last note…
For saving your inventory separately:
Have your avatar logged into your OpenSim grid for this to work, then in the console, type:
save iar avatar name / password
where avatar name is the name of the avatar for which you want to save inventory, followed by the “ / ” then password. This saves the file into the bin folder as user-inventory.iar
Reloading the inventory is just a simple case of:
load iar avatar name / password
We hope some of you find this useful. May sad stories of lost grids and content become a thing of the past.










Not sure if you can help. The process of importing to SL has worked for me before. Now, it says import completed, yet its not rezzing. I cleared my cache and relogged, still wasnt there, tried the import again, still not rezzing. I’m baffled, got any suggestions, please?
Gary
Hi Gary, what viewer are you using and how many prims is the object?
it may be if its made up of more than 100 prims that u try breaking it up into sections and try a simple object as a test or is nothing importing?
Also i’d reset the sim if possible, let me know how you get on