From f23544cd861aadd1ae24dd0ca0ac39517cb8503e Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 27 Nov 2016 23:55:45 +1000 Subject: Fix "only backup people that have logged in since last time", due to OpenSim changing the way they store that. --- scripts/backup-inventories.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts') 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 # 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;" -ss | while read user; do + -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=LEFT(GridUser.UserID,36) and GridUser.Login>${timestamp};" -ss | while read user; do # Replace tab with space user=${user// / } # Find out the size of the last backup, base our later sleep on that, but do it now before backup-inventory packs it away. -- cgit v1.1