如何快速的对网站进行打包,可以使用liunx自带的tar命令
tar -cvf /www/wwwroot/www.abc.com/ac.tar /www/wwwroot/www.abc.com/ --exclude *.log --exclude *.zip --exclude *.rar --exclude *.tar --exclude *.mp4 --exclude *.mp3
/www/wwwroot/www.abc.com/ac.tar 意思是打包存放的地址
/www/wwwroot/www.abc.com/ --exclude *.log --exclude *.zip --exclude *.rar --exclude *.tar --exclude *.mp4 --exclude *.mp3 意思是打包路径/www/wwwroot/www.abc.com/下的所有文件
排除了所有log文件、rar文件、rar文件等等,以此类推。
--exclude 打包时要排除的文件,也可以是目录