cadaver
WebDAV (Web Distributed Authoring and Versioning)
an extension of the Hypertext Transfer Protocol (HTTP) that allows clients to perform remote Web content authoring operations.
cadaver
A command-line WebDAV client for Unix.
Use cadaver
to backup data:
-
Setup WebDAV key
use
jianguoyun
to register an application key.
-
install
cadaver
sudo apt install cadaver
-
configurations for
no-passwd
loginedit
~/.netrc
machine dav.jianguoyun.com login <email> password <passwd>
-
automatic script
edit
/root/backup/backup
andchmod 777
#! /bin/bash mysqldump db > /root/backup/db.sql cadaver https://dav.jianguoyun.com/dav/ < /root/backup/backup_command.txt
edit
/root/backup/backup_command.txt
cd hawia put /root/backup/db.sql bye
-
setup crontab
cp /root/backup/backup /etc/cron.daily/