没啥复杂的啊 找一台大盘鸡安装restic-server, 添加账户. 这个比直接用ssh 快得多, 再搞一个脚本加到定时任务就行 增量备份, 可以恢复到每次备份的快照, 保持最多30个快照,每天一个的话,一个月的量
#!/bin/sh docker exec mysql mysqldump –single-transaction –no-tablespaces –databases xxxx -uxxx -pxxx > xxx.sql rm -rf /data/projects/xxxx/.backup/xxx.sql mv xxx.sql /data/projects/xxx/.backup/xxx.sql export RESTIC_REST_USERNAME=xxx export RESTIC_REST_PASSWORD="xxx" export RESTIC_REPOSITORY="rest:https://xxxx/xxx/" export RESTIC_PASSWORD="xxxx" cd /data/projects restic –verbose backup xxxx restic forget –keep-last 30 –prune |