Changeset View
Changeset View
Standalone View
Standalone View
source/tools/lobbybots/backup/backup-users.sh
- This file was added.
#!/bin/sh | |||||
PREFIX="/lobby/backup/users/ejabberd" | |||||
rm -rfv $PREFIX-$(date --date="14 days ago" +%Y-%m-%d).7z | |||||
DEST="$PREFIX-$(date +%Y-%m-%d)" | |||||
ejabberdctl backup $DEST | |||||
elexis: BUPTMP is only the intermediate
the process returns before the new file is created
an… | |||||
# the process of converting the BUPTMP is asynchroneous | |||||
sleep 45; | |||||
p7zip $DEST | |||||
user1Unsubmitted Not Done Inline ActionsIt seems we ought to remove the folder that was just created and zipped. p7zip $DEST && rm $DEST -r Maybe? user1: It seems we ought to remove the folder that was just created and zipped.
```
p7zip $DEST && rm… | |||||
elexisAuthorUnsubmitted Done Inline ActionsAs discussed in the mod room, p7zip deletes the target automatically. elexis: As discussed in the mod room, p7zip deletes the target automatically.
It didnt happen for some… |
Wildfire Games · Phabricator
BUPTMP is only the intermediate
the process returns before the new file is created
an indefinite waiting loop for the file to vanish sounds ugly
sleep 45; is a working hack, that I guess breaks for huge databases and is too slow for the average case, and ugly as it's not conditional
Took a quick look at the ejabberd code, but didn't follow where the second process is launched, or what else happens.