你的问题应该是 “如何容灾 Debian FTP Server 故障”(或“如何处理 / 避免 Debian FTP 服务器故障”)。下面从 故障排查、冗余容灾、备份恢复 三个层面说明。
systemctl status vsftpd
# 或 proftpd
systemctl status proftpd
重启服务:
systemctl restart vsftpd
netstat -tunlp | grep 21
ufw status
iptables -L -n
开放端口:
ufw allow 21/tcp
vsftpd 示例:
pasv_min_port=30000
pasv_max_port=31000
防火墙同样要放通。
tail -f /var/log/vsftpd.log
journalctl -u vsftpd -f
示例(简要):
apt install keepalived
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 100
virtual_ipaddress {
192.168.1.100
}
}
mount -t nfs storage:/ftp /srv/ftp
rsync -az /srv/ftp/ backup:/ftp_backup/
或
tar czf ftp_$(date +%F).tar.gz /srv/ftp
/etc/passwd
/etc/shadow
/etc/vsftpd.conf
apt install monit
监控 FTP 进程并自动重启。
如果你能说明:
我可以给你 具体可落地的容灾架构图 + 配置示例。