norment / tsd_issues

Repo to track issues with TSD as tickets
2 stars 0 forks source link

Implement backups of NORMENT wiki #49

Closed ofrei closed 3 years ago

ofrei commented 3 years ago

Currently http://norment.awiki.org/dokuwiki/ is hosted on https://www.nrec.no/ . I've looked into moving this wiki to a payed hosting such as https://www.a2hosting.com/dokuwiki-hosting . This works and gives great features such as automated backups. It's easy to migrate the content - we just need to backup the data folder of the wiki, and place it on a new server. However, we can't migrate users - they need to reset their password. For this reason I think we don't need to migrate right now.

What's needed is to have cron jobs to create a .tar.gz from the data folder, and have a copy of this folder on NIRD - then we won't loose the content of awiki.

ofrei commented 3 years ago

Implemented. Will double-check in few days that crontab jobs are running.

#sudo crontab -l
5 4 * * * tar -czvf  /home/debian/wiki_backup/wiki_norment.$(date +"%Y-%m-%d_%H-%M").tar.gz /var/lib/dokuwiki && chown debian:debian /home/debian/wiki_backup/*.tar.gz

# crontab -l 
5 5 * * * rsync --remove-source-files -avzP /home/debian/wiki_backup oleksanf@login.nird.sigma2.no:/projects/NS9114K/biostats

The second command depends on "ssh-agent && ssh-add /home/debian/.ssh/oleksanf_id_rsa".
ofrei commented 3 years ago

Backups are running smoothly.