快速在liunx下web备份打包

如何快速的对网站进行打包,可以使用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 打包时要排除的文件,也可以是目录

 

posted @ 2020-02-26 11:59  枯丿叶  阅读(217)  评论(0)    收藏  举报