aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/backup-inventories.sh4
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
23mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ 21mysql --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.