aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-06-21 03:31:07 +0100
committerUbitUmarov2017-06-21 03:31:07 +0100
commit651952e01eef5ad98e87fbe3909dd11f1d2d9db1 (patch)
tree2010c4d5776915f8408b56117ec83514c937470c /OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
parent revert EnvironmentTick back to orignal clock, since change may cause issues ... (diff)
downloadopensim-SC_OLD-651952e01eef5ad98e87fbe3909dd11f1d2d9db1.zip
opensim-SC_OLD-651952e01eef5ad98e87fbe3909dd11f1d2d9db1.tar.gz
opensim-SC_OLD-651952e01eef5ad98e87fbe3909dd11f1d2d9db1.tar.bz2
opensim-SC_OLD-651952e01eef5ad98e87fbe3909dd11f1d2d9db1.tar.xz
changes to AutoBackModule. Time interval is now unique and only definable on OpenSim.ini. All enabled regions will be saved in sequence whne it expires. Interval is time since last region save end, so will not follow wall clock. This reduces the chance of overlapped saves. Console command renamed to dooarbackup to be more distint from db backup. Lost the region load checks, to put back later
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs59
1 files changed, 13 insertions, 46 deletions
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
index b90f0c4..be5f2ae 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
@@ -38,26 +38,24 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
38 /// 38 ///
39 public class AutoBackupModuleState 39 public class AutoBackupModuleState
40 { 40 {
41 private Dictionary<Guid, string> m_liveRequests = null;
42
43 public AutoBackupModuleState() 41 public AutoBackupModuleState()
44 { 42 {
45 this.Enabled = false; 43 Enabled = false;
46 this.BackupDir = "."; 44 BackupDir = ".";
47 this.BusyCheck = true; 45 SkipAssets = false;
48 this.SkipAssets = false; 46 NamingType = NamingType.Time;
49 this.Timer = null; 47 Script = null;
50 this.NamingType = NamingType.Time; 48 KeepFilesForDays = 0;
51 this.Script = null;
52 this.KeepFilesForDays = 0;
53 } 49 }
54 50
55 public Dictionary<Guid, string> LiveRequests 51 public AutoBackupModuleState(AutoBackupModuleState copyFrom)
56 { 52 {
57 get { 53 Enabled = copyFrom.Enabled;
58 return this.m_liveRequests ?? 54 BackupDir = copyFrom.BackupDir;
59 (this.m_liveRequests = new Dictionary<Guid, string>(1)); 55 SkipAssets = copyFrom.SkipAssets;
60 } 56 NamingType = copyFrom.NamingType;
57 Script = copyFrom.Script;
58 KeepFilesForDays = copyFrom.KeepFilesForDays;
61 } 59 }
62 60
63 public bool Enabled 61 public bool Enabled
@@ -66,33 +64,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
66 set; 64 set;
67 } 65 }
68 66
69 public System.Timers.Timer Timer
70 {
71 get;
72 set;
73 }
74
75 public double IntervalMinutes
76 {
77 get
78 {
79 if (this.Timer == null)
80 {
81 return -1.0;
82 }
83 else
84 {
85 return this.Timer.Interval / 60000.0;
86 }
87 }
88 }
89
90 public bool BusyCheck
91 {
92 get;
93 set;
94 }
95
96 public bool SkipAssets 67 public bool SkipAssets
97 { 68 {
98 get; 69 get;
@@ -126,10 +97,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
126 public new string ToString() 97 public new string ToString()
127 { 98 {
128 string retval = ""; 99 string retval = "";
129
130 retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n"; 100 retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n";
131 retval += "[AUTO BACKUP]: Interval: " + IntervalMinutes + " minutes" + "\n";
132 retval += "[AUTO BACKUP]: Do Busy Check: " + (BusyCheck ? "Yes" : "No") + "\n";
133 retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n"; 101 retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n";
134 retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n"; 102 retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n";
135 retval += "[AUTO BACKUP]: Script: " + Script + "\n"; 103 retval += "[AUTO BACKUP]: Script: " + Script + "\n";
@@ -137,4 +105,3 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
137 } 105 }
138 } 106 }
139} 107}
140