导出数据库:
mysqldump --socket=/var/run/mysqld/mysqld.sock -uroot -p   --single-transaction   --routines   --triggers   --events   --set-gtid-purged=OFF   --source-data=2   --no-tablespaces   hifast > /root/data/hifast-final-0515.sql

jpcV41ppanel

gzip -1 /root/hifast-final-0515.sql





导出redis：
redis-cli -a '0BVz9XOHf7KUfEuoFJRK-dURdKUGFiZ8QeaHpysHnKeKhLskZb55HPK121lFsKtr' BGSAVE
sleep 5
cp /var/lib/redis/dump.rdb /root/data/redis-backup-0515.rdb


导入数据库:
gunzip -c /root/hifast-final-0515.sql.gz | docker exec -i ppanel-mysql mysql -uroot -p'jpcV41ppanel' hifast


导入redis：
docker stop ppanel-redis
docker cp /root/data/redis-backup-0515.rdb ppanel-redis:/data/dump.rdb
docker start ppanel-redis
docker exec ppanel-redis redis-cli -a 'hifast67yj' DBSIZE



docker stop ppanel-redis || true
docker rm -f ppanel-redis

rm -f /root/data/dump.rdb
rm -rf /root/data/appendonlydir
rm -f /root/data/appendonly.aof*
mkdir -p /root/data

docker pull redis:8.6.3
docker run -d \
  --name ppanel-redis \
  --restart always \
  -p 6379:6379 \
  redis:8.6.3 \
  redis-server --requirepass 'hifast67yj'
