diff options
author | David Walter Seikel | 2016-11-27 23:55:45 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-27 23:55:45 +1000 |
commit | f23544cd861aadd1ae24dd0ca0ac39517cb8503e (patch) | |
tree | 6dc5a61dec699f049a6a67e24b4f3fa569a21717 /scripts | |
parent | Backup one more level. (diff) | |
download | opensim-SC_OLD-f23544cd861aadd1ae24dd0ca0ac39517cb8503e.zip opensim-SC_OLD-f23544cd861aadd1ae24dd0ca0ac39517cb8503e.tar.gz opensim-SC_OLD-f23544cd861aadd1ae24dd0ca0ac39517cb8503e.tar.bz2 opensim-SC_OLD-f23544cd861aadd1ae24dd0ca0ac39517cb8503e.tar.xz |
Fix "only backup people that have logged in since last time", due to OpenSim changing the way they store that.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/backup-inventories.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/backup-inventories.sh b/scripts/backup-inventories.sh index 2187f1f..db4d7f4 100755 --- a/scripts/backup-inventories.sh +++ b/scripts/backup-inventories.sh | |||
@@ -18,10 +18,8 @@ touch ${PRGDIR}/../../backups/.keep | |||
18 | # Well it was good in theory, but looks like they broke it in 8.2, no logging in or out updates to GridUser. | 18 | # Well it was good in theory, but looks like they broke it in 8.2, no logging in or out updates to GridUser. |
19 | 19 | ||
20 | # Get the user names, and back 'em up. | 20 | # Get the user names, and back 'em up. |
21 | #mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ | ||
22 | # -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=GridUser.UserID and GridUser.Logout>${timestamp};" -ss | while read user; do | ||
23 | mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ | 21 | mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ |
24 | -e "select FirstName,LastName from UserAccounts;" -ss | while read user; do | 22 | -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=LEFT(GridUser.UserID,36) and GridUser.Login>${timestamp};" -ss | while read user; do |
25 | # Replace tab with space | 23 | # Replace tab with space |
26 | user=${user// / } | 24 | user=${user// / } |
27 | # Find out the size of the last backup, base our later sleep on that, but do it now before backup-inventory packs it away. | 25 | # Find out the size of the last backup, base our later sleep on that, but do it now before backup-inventory packs it away. |