cloudstack平台环境的备份

management端

cp -avx /usr/share/tomcat6/* /home/backup/management/usr/share/tomcat6/
cp -avx /usr/share/cloudstack-bridge/* /home/backup/management/usr/share/cloudstack-bridge/
cp -avx /usr/share/cloudstack-common/* /home/backup/management/usr/share/cloudstack-common/
cp -avx /usr/share/cloudstack-management/* /home/backup/management/usr/share/cloudstack-management/
cp -avx /etc/cloudstack/* /home/backup/management/etc/cloudstack/
cp -avx /var/cache/cloudstack/* /home/backup/management/var/cache/cloudstack/
cp -avx /usr/local/nginx/* /home/backup/management/usr/local/nginx/
cp -avx /root/bin/* /home/backup/management/root/bin/
cp -avx /var/spool/cron/* /home/backup/management/var/spool/cron
cp -avx /etc/hosts /home/backup/management/etc/hosts
cp -avx /etc/yum.repos.d/* /home/backup/management/etc/yum.repos.d/
ps -ef > /home/backup/management/ps.txt
mount > /home/backup/management/mount.txt
df -lh > /home/backup/management/df.lh
netstat -anplt > /home/backup/management/netstat.txt
/usr/bin/mysqldump --skip-lock-tables --single-transaction --master-data=2 --all-databases | gzip -f > /home/backup/Cloudstack_All_`date +%Y%m%d%H%M`.gz
ssh root@node01:cp -avx /var/www/html/4.5/* /mnt/5787b8e0-47c4-3d20-bc21-5be749b09372/backup/4.5/

agent端

cp -r /etc/cloudstack /gfs_data/cloudstack-backup/agent/

posted @ 2018-05-10 14:00  火罐儿  阅读(254)  评论(0编辑  收藏  举报