New backup carried out on anarwiki.org by root at local Tue Apr 30 11:08:56 UTC 2024.

This commit is contained in:
root 2024-04-30 11:08:56 +00:00
parent bca74b2b9a
commit a59dbd5ab9
8 changed files with 394678 additions and 0 deletions

22
backup-private.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# This backups the mediawiki installation.
set -e
mkdir -p assets
pass=$(grep wgDBpassword ../LocalSettings.php | awk -F'"' '{print $2}')
user=$(grep wgDBuser ../LocalSettings.php | awk -F'"' '{print $2}')
name=$(grep wgDBname ../LocalSettings.php | awk -F'"' '{print $2}')
host=$(grep wgDBserver ../LocalSettings.php | awk -F'"' '{print $2}')
MYSQL_PWD=$pass mysqldump --no-tablespaces -h $host -u $user $name > assets/database.sql
php ../maintenance/dumpBackup.php --full > assets/full-dump.xml
tar zcvfh assets/wikidata.tar.gz --exclude="backupper" ..
# Also copy the docs
cp *.txt *.sh assets/

8
cron.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd $SCRIPT_DIR
nice ./backup-private.sh # && ./git-backup.sh

1776
database.sql Normal file

File diff suppressed because one or more lines are too long

392845
full-dump.xml Normal file

File diff suppressed because one or more lines are too long

27
git-backup.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
#
# This script copies the contents of a directory to the git master
# of a given repository. It thus can abuse Git for revisioned
# backups. Sweet!
# 2021, Public Domain, SvenK
backup_directory="assets"
git_work_directory="assets-git"
# these are secrets:
user="<YOUR USERNEME. better make a dedicated token at github/gitlab/etc>"
pass="<YOUR PASS>"
remote="https://$user:$pass@githost/the/path.git"
set -e
rm -rf $git_work_directory
git clone --depth=1 $remote $git_work_directory
cp $backup_directory/* $git_work_directory
cd $git_work_directory
git add .
git commit -m"New backup carried out on $(hostname) by $(whoami) at local $(date)."
git push
cd ..

BIN
wikidata.partaa Normal file

Binary file not shown.

BIN
wikidata.partab Normal file

Binary file not shown.

BIN
wikidata.partac Normal file

Binary file not shown.