aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-05-26 02:22:52 +0100
committerJustin Clark-Casey (justincc)2011-05-26 02:22:52 +0100
commit3270f4353e0a2bded9361a72526ba673e6266cc1 (patch)
tree6de02c29ee9e2008f286c815ebdba94f135233a7 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
parentBump OAR file format version up to 0.7 for this development cycle. (diff)
downloadopensim-SC_OLD-3270f4353e0a2bded9361a72526ba673e6266cc1.zip
opensim-SC_OLD-3270f4353e0a2bded9361a72526ba673e6266cc1.tar.gz
opensim-SC_OLD-3270f4353e0a2bded9361a72526ba673e6266cc1.tar.bz2
opensim-SC_OLD-3270f4353e0a2bded9361a72526ba673e6266cc1.tar.xz
Add --noassets option for "save iar"
Like "save oar", this saves an iar without assets This can be useful for backup when you know the required assets will still be present (e.g. you're backing up the assets db separately). This also bumps the iar format version to 0.3 and 1.2 respectively. 0.3 is backward compatible with previous opensim versions 1.2 is used if the --profile switch is specified. It is only compatible with 0.7.1 presently.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 576a154..e0b02aa 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
122 122
123 scene.AddCommand( 123 scene.AddCommand(
124 this, "save iar", 124 this, "save iar",
125 "save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>] [--v|-verbose]", 125 "save iar [--p|-profile=<url>] [--noassets] <first> <last> <inventory path> <password> [<IAR path>] [--v|-verbose]",
126 "Save user inventory archive (IAR).", 126 "Save user inventory archive (IAR).",
127 "<first> is the user's first name." + Environment.NewLine 127 "<first> is the user's first name." + Environment.NewLine
128 + "<last> is the user's last name." + Environment.NewLine 128 + "<last> is the user's last name." + Environment.NewLine
@@ -130,6 +130,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
130 + "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine 130 + "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
131 + "-c|--creators preserves information about foreign creators." + Environment.NewLine 131 + "-c|--creators preserves information about foreign creators." + Environment.NewLine
132 + "-v|--verbose extra debug messages." + Environment.NewLine 132 + "-v|--verbose extra debug messages." + Environment.NewLine
133 + "--noassets stops assets being saved to the IAR."
133 + "<IAR path> is the filesystem path at which to save the IAR." 134 + "<IAR path> is the filesystem path at which to save the IAR."
134 + string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME), 135 + string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
135 HandleSaveInvConsoleCommand); 136 HandleSaveInvConsoleCommand);
@@ -398,6 +399,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
398 ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); 399 ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
399 ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; }); 400 ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; });
400 ops.Add("c|creators", delegate(string v) { options["creators"] = v; }); 401 ops.Add("c|creators", delegate(string v) { options["creators"] = v; });
402 ops.Add("noassets", delegate(string v) { options["noassets"] = v != null; });
401 403
402 List<string> mainParams = ops.Parse(cmdparams); 404 List<string> mainParams = ops.Parse(cmdparams);
403 405
@@ -406,7 +408,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
406 if (mainParams.Count < 6) 408 if (mainParams.Count < 6)
407 { 409 {
408 m_log.Error( 410 m_log.Error(
409 "[INVENTORY ARCHIVER]: usage is save iar [--p|-profile=<url>] <first name> <last name> <inventory path> <user password> [<save file path>]"); 411 "[INVENTORY ARCHIVER]: usage is save iar [--p|-profile=<url>] [--noassets] <first name> <last name> <inventory path> <user password> [<save file path>]");
410 return; 412 return;
411 } 413 }
412 414
@@ -423,16 +425,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
423 m_log.InfoFormat( 425 m_log.InfoFormat(
424 "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", 426 "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}",
425 savePath, invPath, firstName, lastName); 427 savePath, invPath, firstName, lastName);
426 428
429 lock (m_pendingConsoleSaves)
430 m_pendingConsoleSaves.Add(id);
431
427 ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, options); 432 ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, options);
428 } 433 }
429 catch (InventoryArchiverException e) 434 catch (InventoryArchiverException e)
430 { 435 {
431 m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", e.Message); 436 m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", e.Message);
432 } 437 }
433
434 lock (m_pendingConsoleSaves)
435 m_pendingConsoleSaves.Add(id);
436 } 438 }
437 439
438 private void SaveInvConsoleCommandCompleted( 440 private void SaveInvConsoleCommandCompleted(