New backup carried out on anarwiki.org by root at local Fri May 3 19:12:04 UTC 2024.
This commit is contained in:
parent
90c890d6b0
commit
cbc0b5c95b
36
README.md
36
README.md
|
|
@ -33,46 +33,16 @@ which calls the following -
|
||||||
* /var/www/html/mediawiki/backupper/markdown-export.sh
|
* /var/www/html/mediawiki/backupper/markdown-export.sh
|
||||||
* /var/www/html/mediawiki/backupper/git-backup.sh
|
* /var/www/html/mediawiki/backupper/git-backup.sh
|
||||||
|
|
||||||
git-backup.sh has been altered due to Github file size constraints -
|
|
||||||
|
|
||||||
```
|
|
||||||
backup_directory="assets"
|
|
||||||
git_work_directory="AnarWiki"
|
|
||||||
remote="git@github.com:AnarDocs/AnarWiki.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
|
|
||||||
split -b 50M wikidata.tar.gz "wikidata.part"
|
|
||||||
rm wikidata.tar.gz
|
|
||||||
git add *
|
|
||||||
git repack -a -d -f --window=0
|
|
||||||
git commit -m"New backup carried out on $(hostname) by $(whoami) at local $(date)."
|
|
||||||
git push
|
|
||||||
cd ..
|
|
||||||
```
|
|
||||||
|
|
||||||
/var/www/html/mediawiki/backupper/markdown-export.sh -
|
/var/www/html/mediawiki/backupper/markdown-export.sh -
|
||||||
|
|
||||||
requires this script - https://github.com/outofcontrol/mediawiki-to-gfm
|
requires this script - https://github.com/outofcontrol/mediawiki-to-gfm
|
||||||
|
|
||||||
```
|
```
|
||||||
backup_directory="markdown"
|
# The same as git-backup.sh except this is added at the start -
|
||||||
git_work_directory="AnarWiki"
|
|
||||||
remote="git@github.com:AnarDocs/AnarWiki.git"
|
|
||||||
set -e
|
|
||||||
# Export to markdown
|
# Export to markdown
|
||||||
/var/www/html/mediawiki/backupper/mediawiki-to-gfm/convert.php --filename=/var/www/html/mediawiki/backupper/assets/full-dump.xml >
|
/var/www/html/mediawiki/backupper/convert.php --filename=/var/www/html/mediawiki/backupper/assets/full-dump.xml --output=/var/www/html/mediawiki/backupper/markdown
|
||||||
backup_directory="markdown"
|
backup_directory="markdown"
|
||||||
#rm -rf $git_work_directory
|
git_work_directory="markdown-git"
|
||||||
#git clone --depth=1 $remote $git_work_directory
|
|
||||||
cp -R $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 ..
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backup Locations
|
### Backup Locations
|
||||||
|
|
|
||||||
|
|
@ -18,5 +18,5 @@ php ../maintenance/dumpBackup.php --full > assets/full-dump.xml
|
||||||
tar zcvfh assets/wikidata.tar.gz --exclude="backupper" ..
|
tar zcvfh assets/wikidata.tar.gz --exclude="backupper" ..
|
||||||
|
|
||||||
# Also copy the docs
|
# Also copy the docs
|
||||||
cp *.txt *.sh assets/
|
cp *.md *.sh assets/
|
||||||
|
|
||||||
|
|
|
||||||
2
cron.sh
2
cron.sh
|
|
@ -4,5 +4,5 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
|
||||||
cd $SCRIPT_DIR
|
cd $SCRIPT_DIR
|
||||||
|
|
||||||
nice ./backup-private.sh # && ./git-backup.sh
|
nice ./backup-private.sh # && ./git-backup.sh && ./markdown-backup.sh
|
||||||
|
|
||||||
|
|
|
||||||
108
database.sql
108
database.sql
File diff suppressed because one or more lines are too long
1548
full-dump.xml
1548
full-dump.xml
File diff suppressed because it is too large
Load Diff
|
|
@ -6,12 +6,12 @@
|
||||||
# 2021, Public Domain, SvenK
|
# 2021, Public Domain, SvenK
|
||||||
|
|
||||||
backup_directory="assets"
|
backup_directory="assets"
|
||||||
git_work_directory="assets-git"
|
git_work_directory="AnarWiki"
|
||||||
|
|
||||||
# these are secrets:
|
# these are secrets:
|
||||||
user="<YOUR USERNEME. better make a dedicated token at github/gitlab/etc>"
|
#user="<YOUR USERNEME. better make a dedicated token at github/gitlab/etc>"
|
||||||
pass="<YOUR PASS>"
|
#pass="<YOUR PASS>"
|
||||||
remote="https://$user:$pass@githost/the/path.git"
|
remote="git@github.com:AnarDocs/AnarWiki.git"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
@ -20,7 +20,10 @@ rm -rf $git_work_directory
|
||||||
git clone --depth=1 $remote $git_work_directory
|
git clone --depth=1 $remote $git_work_directory
|
||||||
cp $backup_directory/* $git_work_directory
|
cp $backup_directory/* $git_work_directory
|
||||||
cd $git_work_directory
|
cd $git_work_directory
|
||||||
git add .
|
split -b 50M wikidata.tar.gz "wikidata.part"
|
||||||
|
rm wikidata.tar.gz
|
||||||
|
git add *
|
||||||
|
git repack -a -d -f --window=0
|
||||||
git commit -m"New backup carried out on $(hostname) by $(whoami) at local $(date)."
|
git commit -m"New backup carried out on $(hostname) by $(whoami) at local $(date)."
|
||||||
git push
|
git push
|
||||||
cd ..
|
cd ..
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/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="markdown"
|
||||||
|
git_work_directory="AnarWiki"
|
||||||
|
|
||||||
|
# these are secrets:
|
||||||
|
#user="<YOUR USERNEME. better make a dedicated token at github/gitlab/etc>"
|
||||||
|
#pass="<YOUR PASS>"
|
||||||
|
remote="git@github.com:AnarDocs/AnarWiki.git"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Export to markdown
|
||||||
|
/var/www/html/mediawiki/backupper/mediawiki-to-gfm/convert.php --filename=/var/www/html/mediawiki/backupper/assets/full-dump.xml --output=/var/www/html/mediawiki/backupper/markdown
|
||||||
|
backup_directory="markdown"
|
||||||
|
|
||||||
|
#rm -rf $git_work_directory
|
||||||
|
|
||||||
|
#git clone --depth=1 $remote $git_work_directory
|
||||||
|
cp -R $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
BIN
wikidata.partaa
Binary file not shown.
BIN
wikidata.partab
BIN
wikidata.partab
Binary file not shown.
BIN
wikidata.partac
BIN
wikidata.partac
Binary file not shown.
Loading…
Reference in New Issue