From 05ca9c0c81ff0e1547ef1ac5824740db20745541 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 9 Nov 2016 02:46:04 +1000 Subject: Alas "make IARs for those that logged on since the last time" failed, 8.2 broke it. Bring it back after that gets fixed. --- scripts/backup-inventories.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/backup-inventories.sh') 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) # Only backup those that have not logged on since their last backup, but returning prims from sims will bypass this check. timestamp=$(ls -o --time-style="+%s" ${PRGDIR}/../backups/.keep | cut -d ' ' -f 5) touch ${PRGDIR}/../backups/.keep +# Well it was good in theory, but looks like they broke it in 8.2, no logging in or out updates to GridUser. # Get the user names, and back 'em up. +#mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ +# -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=GridUser.UserID and GridUser.Logout>${timestamp};" -ss | while read user; do mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ - -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=GridUser.UserID and GridUser.Logout>${timestamp};" -ss | while read user; do + -e "select FirstName,LastName from UserAccounts;" -ss | while read user; do # Replace tab with space user=${user// / } ${PRGDIR}/backup-inventory "${user}" -- cgit v1.1