aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/backup-inventories.sh
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-09 02:46:04 +1000
committerDavid Walter Seikel2016-11-09 02:46:04 +1000
commit05ca9c0c81ff0e1547ef1ac5824740db20745541 (patch)
treebf6758a509c44df1abdce49742edb6e68a8c629b /scripts/backup-inventories.sh
parentKeep the password a secret. (diff)
downloadopensim-SC_OLD-05ca9c0c81ff0e1547ef1ac5824740db20745541.zip
opensim-SC_OLD-05ca9c0c81ff0e1547ef1ac5824740db20745541.tar.gz
opensim-SC_OLD-05ca9c0c81ff0e1547ef1ac5824740db20745541.tar.bz2
opensim-SC_OLD-05ca9c0c81ff0e1547ef1ac5824740db20745541.tar.xz
Alas "make IARs for those that logged on since the last time" failed, 8.2 broke it.
Bring it back after that gets fixed.
Diffstat (limited to '')
-rwxr-xr-xscripts/backup-inventories.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/backup-inventories.sh b/scripts/backup-inventories.sh
index 642d71d..30f8ac6 100755
--- a/scripts/backup-inventories.sh
+++ b/scripts/backup-inventories.sh
@@ -28,10 +28,13 @@ done < <(grep ConnectionString ${PRGDIR}/../config/config.ini | cut -d '"' -f 2)
28# Only backup those that have not logged on since their last backup, but returning prims from sims will bypass this check. 28# Only backup those that have not logged on since their last backup, but returning prims from sims will bypass this check.
29timestamp=$(ls -o --time-style="+%s" ${PRGDIR}/../backups/.keep | cut -d ' ' -f 5) 29timestamp=$(ls -o --time-style="+%s" ${PRGDIR}/../backups/.keep | cut -d ' ' -f 5)
30touch ${PRGDIR}/../backups/.keep 30touch ${PRGDIR}/../backups/.keep
31# Well it was good in theory, but looks like they broke it in 8.2, no logging in or out updates to GridUser.
31 32
32# Get the user names, and back 'em up. 33# Get the user names, and back 'em up.
34#mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \
35# -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=GridUser.UserID and GridUser.Logout>${timestamp};" -ss | while read user; do
33mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ 36mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \
34 -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=GridUser.UserID and GridUser.Logout>${timestamp};" -ss | while read user; do 37 -e "select FirstName,LastName from UserAccounts;" -ss | while read user; do
35 # Replace tab with space 38 # Replace tab with space
36 user=${user// / } 39 user=${user// / }
37 ${PRGDIR}/backup-inventory "${user}" 40 ${PRGDIR}/backup-inventory "${user}"