10 lines
431 B
Bash
10 lines
431 B
Bash
#!/bin/bash
|
|
### Wiki ###
|
|
mkdir "$BACKUPDIR"/wiki/
|
|
for i in `find /usr/share/webapps/ -maxdepth 1 -type d | grep mediawiki`; do
|
|
foldername="$(echo "$i" | rev | cut -f 1 -d '/' | rev)"
|
|
dbname="$(grep '^\$wgDBname' "$i"/LocalSettings.php | cut -f 2 -d \")"
|
|
$BACKUPCMD "${i}"/LocalSettings.php "$BACKUPDIR"/wiki/"$foldername"-localsettings.php
|
|
sudo -u postgres pg_dump "$dbname" > "$BACKUPDIR"/wiki/"$dbname".psql
|
|
done
|