diff options
author | David Walter Seikel | 2016-11-27 23:53:51 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-27 23:53:51 +1000 |
commit | b4fdb5524411dc51ba60713387d87f532f1d6d02 (patch) | |
tree | 589b872e7d52b875dffddfa9c1720da4a95d36d2 /scripts/backup-inventories.sh | |
parent | Break out common script bits into their own file. (diff) | |
download | opensim-SC_OLD-b4fdb5524411dc51ba60713387d87f532f1d6d02.zip opensim-SC_OLD-b4fdb5524411dc51ba60713387d87f532f1d6d02.tar.gz opensim-SC_OLD-b4fdb5524411dc51ba60713387d87f532f1d6d02.tar.bz2 opensim-SC_OLD-b4fdb5524411dc51ba60713387d87f532f1d6d02.tar.xz |
Sleep between backups based on size of the backup file. Poor mans "wait for it to finish" guess.
Diffstat (limited to '')
-rwxr-xr-x | scripts/backup-inventories.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/backup-inventories.sh b/scripts/backup-inventories.sh index 1d753eb..ef74385 100755 --- a/scripts/backup-inventories.sh +++ b/scripts/backup-inventories.sh | |||
@@ -24,9 +24,10 @@ mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User I | |||
24 | -e "select FirstName,LastName from UserAccounts;" -ss | while read user; do | 24 | -e "select FirstName,LastName from UserAccounts;" -ss | while read user; do |
25 | # Replace tab with space | 25 | # Replace tab with space |
26 | user=${user// / } | 26 | 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. | ||
28 | sizeSleep=`sleepPerSize i "${user}"` | ||
27 | ${PRGDIR}/backup-inventory "${user}" | 29 | ${PRGDIR}/backup-inventory "${user}" |
28 | # Sleep for a while, so that there is plenty of time to do the backup, | 30 | # Sleep for a while, so that there is plenty of time to do the backup, |
29 | # and we are not keeping the computer very busy if there are lots of users. | 31 | # and we are not keeping the computer very busy if there are lots of users. |
30 | # My big arsed 1 GB OAR takes about ten minutes to create, and maybe an hour to gitIOR! | 32 | sleep ${sizeSleep} |
31 | sleep 200 | ||
32 | done | 33 | done |