Metainformationen zur Seite
  •  

Dokuwiki Backup per ftp

#!/bin/bash
# backup data from wiki (FTP)
# https://www.dokuwiki.org/tips:backup_script#via_ftp_using_wget
#  FTP-Login stored in $HOME/.netrc
#  machine example.net login USER password PW

name="$(date +%Y%m%d)-dokuwikibackup"
url="ftp://example.net/"
backup="/path/to/backup"

#mkdir $backup/$name
cd $backup

wget -q --no-cache -nH -c -t0 --mirror -P$backup -i- <<EOF
        $url/data/pages
        $url/data/meta
        $url/data/media
        $url/data/attic
        $url/conf
EOF

#tar cvzf $name.tar.gz $name
#rm -rf $name
git add *
git commit -m "$name"
#git erstellen
git init
git add *
git config --global user.email "pi@rpi"
git config --global user.name "Your Name"
git commit -m "4.5.2021"
crontab -e

0 14 * * * ~/backupscript.sh >/dev/null
#GIT on other side
https://git-scm.com/book/de/v2/Git-auf-dem-Server-Einrichten-des-Servers
https://superuser.com/a/868699

sudo adduser git
su git
cd
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
#add key

vim ~/.ssh/config
#Use the ~/.ssh/config file as suggested in other answers in order to specify the location of your private key, e.g.

Host github.com
  User git
  Hostname github.com
  IdentityFile ~/.ssh/id_rsa