最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】CentOS下用7zip压缩文件去备份网站

CentOS crifan 3434浏览 0评论

折腾:

【记录】Linode中扩大当前分区的空间

后,就有足够空间去压缩网站文件以实现备份了。

想要用貌似压缩比最大的7zip:

linux 7zip 压缩

Ubuntu Linux 安装 .7z 解压和压缩文件 – CSDN博客

Linux下解压:tar、rar、7z命令简单易懂的教程(含实例) – CSDN博客

7z(p7zip)压缩软件在Linux下的安装和使用 – 运维技术的个人空间

<code>[root@crifan www.crifan.com]# yum -y install pz7ip
Loaded plugins: fastestmirror
librehat-shadowsocks                                                                                                                                              | 3.5 kB  00:00:00     
librehat-shadowsocks/x86_64/primary_db                                                                                                                            |  24 kB  00:00:00     
Determining fastest mirrors
 * base: mirrors.linode.com
 * epel: mirrors.mit.edu
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
No package pz7ip available.
Error: Nothing to do
</code>

No package pz7ip available

centos No package pz7ip available

centos 7zip 安装

CentOS中如何安装7ZIP | 秋水逸冰

centos安装7zip – CSDN博客

Centos7 安装7z – CSDN博客

CentOS 7安装7zip和iftop_Linux教程_Linux公社-Linux系统门户网站

CentOS安装rar、7z压缩 | 天使羊波波闪耀光芒

此处通过:

查看centos版本号 – IDO老徐 – 博客园

的:

<code>[root@crifan www.crifan.com]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core) 
</code>

得知此处是:

CentOS 7.3

去:

Download

-》

找了半天,找到了源码下载地址:

7-Zip – Browse Files at SourceForge.net

-》

7-Zip – Browse /7-Zip at SourceForge.net

-》

https://sourceforge.net/projects/sevenzip/files/7-Zip/18.03/

-》

https://jaist.dl.sourceforge.net/project/sevenzip/7-Zip/18.03/7z1803-src.7z

<code>[root@crifan www.crifan.com]# wget https://jaist.dl.sourceforge.net/project/sevenzip/7-Zip/18.03/7z1803-src.7z
--2018-03-20 11:07:26--  https://jaist.dl.sourceforge.net/project/sevenzip/7-Zip/18.03/7z1803-src.7z
Resolving jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)... 2001:df0:2ed:feed::feed, 150.65.7.130
Connecting to jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)|2001:df0:2ed:feed::feed|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1058854 (1.0M) [application/x-7z-compressed]
Saving to: z1803-src.7z

100%[===============================================================================================================================================&gt;] 1,058,854    241KB/s   in 4.3s   

2018-03-20 11:07:31 (241 KB/s) - z1803-src.7zsaved [1058854/1058854]
</code>

再去解压缩,发现不对:

<code>[root@crifan www.crifan.com]# tar -jxvf 7z1803-src.7z 
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
</code>

本身就是7zip形式的。。。

Centos7 安装7z – CSDN博客

好像源码地址是:

p7zip – Browse /p7zip at SourceForge.net

???

-》

https://sourceforge.net/projects/p7zip/files/p7zip/16.02/

-》

https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_src_all.tar.bz2/download

-》

https://nchc.dl.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2

然后去下载:

<code>[root@crifan www.crifan.com]# cd ..
[root@crifan wwwroot]# ll
total 12
drwxr-xr-x  5 www www 4096 Dec  6 16:19 book.crifan.com
drwxr-xr-x  3 www www 4096 Sep 10  2017 crifan
drwxr-xr-x 13 www www 4096 Mar 20 11:10 www.crifan.com
[root@crifan wwwroot]# wget https://nchc.dl.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2
--2018-03-20 11:10:32--  https://nchc.dl.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2
Resolving nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)... 2001:e10:ffff:1f02::17, 211.79.60.17
Connecting to nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)|2001:e10:ffff:1f02::17|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4239909 (4.0M) [application/octet-stream]
Saving to: 7zip_16.02_src_all.tar.bz2

100%[===============================================================================================================================================&gt;] 4,239,909   1.51MB/s   in 2.7s   

2018-03-20 11:10:36 (1.51 MB/s) - 7zip_16.02_src_all.tar.bz2saved [4239909/4239909]

[root@crifan wwwroot]# ll
total 4156
drwxr-xr-x  5 www  www     4096 Dec  6 16:19 book.crifan.com
drwxr-xr-x  3 www  www     4096 Sep 10  2017 crifan
-rw-r--r--  1 root root 4239909 Jul 14  2016 p7zip_16.02_src_all.tar.bz2
drwxr-xr-x 13 www  www     4096 Mar 20 11:10 www.crifan.com
[root@crifan wwwroot]# tar -jxf p7zip_16.02_src_all.tar.bz2 
[root@crifan wwwroot]# ll
total 4160
drwxr-xr-x  5 www  www     4096 Dec  6 16:19 book.crifan.com
drwxr-xr-x  3 www  www     4096 Sep 10  2017 crifan
drwx--S--- 11 www  ftp     4096 Jul 14  2016 p7zip_16.02
-rw-r--r--  1 root root 4239909 Jul 14  2016 p7zip_16.02_src_all.tar.bz2
drwxr-xr-x 13 www  www     4096 Mar 20 11:10 www.crifan.com
[root@crifan wwwroot]# cd p7zip_16.02
[root@crifan p7zip_16.02]# ll
total 400
drwx--S--- 3 www ftp  4096 Mar 24  2016 Asm
drwx--S--- 2 www ftp  4096 Jun 11  2016 C
-rw-r--r-- 1 www ftp 39517 Jun 11  2016 ChangeLog
drwx--S--- 3 www ftp  4096 Jun 12  2016 check
drwx--S--- 5 www ftp  4096 Mar 24  2016 contrib
drwx--S--- 8 www ftp  4096 Mar 24  2016 CPP
drwx--S--- 3 www ftp  4096 Jun 11  2016 DOC
drwx--S--- 6 www ftp  4096 May 19  2016 GUI
-rw-r--r-- 1 www ftp   326 Feb 24  2011 install_local_context_menu.sh
-rwxr-xr-x 1 www ftp  5911 Oct  5  2015 install.sh
-rw-r--r-- 1 www ftp    29 May 20  2016 last_error
-rw-r--r-- 1 www ftp  2482 Feb 29  2016 makefile
-rw-r--r-- 1 www ftp   426 Oct  5  2015 makefile.afl
-rw-r--r-- 1 www ftp   383 Sep 14  2015 makefile.aix_gcc
-rw-r--r-- 1 www ftp  1474 Mar 11  2016 makefile.android_arm
-rw-r--r-- 1 www ftp   275 Sep 14  2015 makefile.beos
-rw-r--r-- 1 www ftp  5080 May 19  2016 makefile.common
-rw-r--r-- 1 www ftp   158 Dec 30  2014 makefile.crc32
-rw-r--r-- 1 www ftp   307 Sep 14  2015 makefile.cygwin
-rw-r--r-- 1 www ftp   312 Sep 20  2015 makefile.cygwin64
-rw-r--r-- 1 www ftp   372 Sep 26  2015 makefile.cygwin64_asm
-rw-r--r-- 1 www ftp   350 Sep 19  2015 makefile.cygwin_asm
-rw-r--r-- 1 www ftp   310 Feb 17  2016 makefile.cygwin_clang
-rw-r--r-- 1 www ftp   353 Feb 17  2016 makefile.cygwin_clang_asm
-rw-r--r-- 1 www ftp   348 Sep 14  2015 makefile.djgpp
-rw-r--r-- 1 www ftp  1426 Sep 19  2015 makefile.djgpp_watt
-rw-r--r-- 1 www ftp   312 Sep 14  2015 makefile.freebsd5
-rw-r--r-- 1 www ftp   334 Mar  2  2016 makefile.freebsd6+
-rw-r--r-- 1 www ftp  1156 Mar 11  2016 makefile.glb
-rw-r--r-- 1 www ftp   321 Jan 12  2015 makefile.gprof
-rw-r--r-- 1 www ftp   287 Sep 30  2015 makefile.haiku
-rw-r--r-- 1 www ftp   274 Jan 12  2015 makefile.hpux-acc
-rw-r--r-- 1 www ftp   330 Jan 12  2015 makefile.hpux-acc_64
-rw-r--r-- 1 www ftp   315 Sep 14  2015 makefile.hpux-gcc
-rw-r--r-- 1 www ftp   401 Sep 14  2015 makefile.linux_amd64
-rw-r--r-- 1 www ftp   525 Sep 19  2015 makefile.linux_amd64_asm
-rw-r--r-- 1 www ftp   521 Sep 19  2015 makefile.linux_amd64_asm_icc
-rw-r--r-- 1 www ftp   621 Oct  4  2015 makefile.linux_amd64_sanitizer
-rw-r--r-- 1 www ftp   368 Sep 14  2015 makefile.linux_any_cpu
-rw-r--r-- 1 www ftp   494 Sep 14  2015 makefile.linux_any_cpu_gcc_4.X
-rw-r--r-- 1 www ftp   434 Sep 19  2015 makefile.linux_clang_amd64_asm
-rw-r--r-- 1 www ftp   554 Oct 18  2015 makefile.linux_clang_amd64_asm_sanitize
-rw-r--r-- 1 www ftp   518 Sep 14  2015 makefile.linux_cross_aarch64
-rw-r--r-- 1 www ftp   507 Sep 14  2015 makefile.linux_cross_arm
-rw-r--r-- 1 www ftp   511 Feb 18  2016 makefile.linux_cross_djgpp
-rw-r--r-- 1 www ftp   573 Mar  3  2016 makefile.linux_cross_m68k
-rw-r--r-- 1 www ftp   506 Mar  2  2016 makefile.linux_cross_mipsel
-rw-r--r-- 1 www ftp   501 Sep 14  2015 makefile.linux_cross_ppc
-rw-r--r-- 1 www ftp   518 Sep 14  2015 makefile.linux_cross_ppc64
-rw-r--r-- 1 www ftp   534 Sep 14  2015 makefile.linux_cross_ppc64le
-rw-r--r-- 1 www ftp   507 Mar  2  2016 makefile.linux_cross_s390x
-rw-r--r-- 1 www ftp   514 Mar  2  2016 makefile.linux_cross_sparc64
-rw-r--r-- 1 www ftp   349 Sep 19  2015 makefile.linux_gcc_2.95_no_need_for_libstdc
-rw-r--r-- 1 www ftp   533 May 19  2016 makefile.linux_gcc6_sanitize
-rw-r--r-- 1 www ftp   682 Sep 14  2015 makefile.linux_other
-rw-r--r-- 1 www ftp   427 Sep 14  2015 makefile.linux_s390x
-rw-r--r-- 1 www ftp   371 Sep 21  2015 makefile.linux_scan-build
-rw-r--r-- 1 www ftp   483 Sep 19  2015 makefile.linux_valgrind
-rw-r--r-- 1 www ftp   402 Sep 14  2015 makefile.linux_x32
-rw-r--r-- 1 www ftp   617 Sep 19  2015 makefile.linux_x86_asm_gcc_4.X
-rw-r--r-- 1 www ftp   608 Sep 19  2015 makefile.linux_x86_asm_gcc_4.X_fltk
-rw-r--r-- 1 www ftp   464 Sep 19  2015 makefile.linux_x86_asm_gcc_mudflap_4.X
-rw-r--r-- 1 www ftp   488 Sep 19  2015 makefile.linux_x86_asm_icc
-rw-r--r-- 1 www ftp   455 Jan 12  2015 makefile.linux_x86_icc
-rw-r--r-- 1 www ftp   368 Jul 14  2016 makefile.machine
-rw-r--r-- 1 www ftp   345 Jan 12  2015 makefile.macosx_gcc_32bits
-rw-r--r-- 1 www ftp   431 Sep 19  2015 makefile.macosx_gcc_32bits_asm
-rw-r--r-- 1 www ftp   380 Jan 12  2015 makefile.macosx_gcc_32bits_ppc
-rw-r--r-- 1 www ftp   345 Jan 12  2015 makefile.macosx_gcc_64bits
-rw-r--r-- 1 www ftp   484 Jun 13  2015 makefile.macosx_llvm_64bits
-rw-r--r-- 1 www ftp   371 Sep 14  2015 makefile.netbsd
-rw-r--r-- 1 www ftp  1083 Sep 19  2015 makefile.netware_asm_gcc_3.X
-rw-r--r-- 1 www ftp  2565 Feb 29  2016 makefile.oldmake
-rw-r--r-- 1 www ftp   580 Jun 12  2016 makefile.openbsd
-rw-r--r-- 1 www ftp   649 Jun 12  2016 makefile.openbsd_no_port
-rw-r--r-- 1 www ftp   518 Sep 14  2015 makefile.qnx_shared.bin
-rw-r--r-- 1 www ftp   534 Sep 14  2015 makefile.qnx_shared.so
-rw-r--r-- 1 www ftp   524 Sep 14  2015 makefile.qnx_static
-rw-r--r-- 1 www ftp   402 Sep 14  2015 makefile.solaris_sparc_CC_32
-rw-r--r-- 1 www ftp   485 Sep 14  2015 makefile.solaris_sparc_CC_64
-rw-r--r-- 1 www ftp   343 Sep 14  2015 makefile.solaris_sparc_gcc
-rw-r--r-- 1 www ftp   300 Sep 14  2015 makefile.solaris_x86
-rw-r--r-- 1 www ftp   367 Sep 14  2015 makefile.tru64
drwx--S--- 2 www ftp  4096 Mar 24  2016 man1
-rw-r--r-- 1 www ftp 12069 Jun 11  2016 README
-rw-r--r-- 1 www ftp   704 Nov 21  2015 TODO
drwx--S--- 3 www ftp  4096 Mar 10  2016 Utils
[root@crifan p7zip_16.02]# 
</code>

和安装:

make

make install

<code>make
...
o ProgressMt.o ProgressUtils.o PropId.o StreamBinder.o StreamObjects.o StreamUtils.o UniqBlocks.o VirtThread.o BZip2Crc.o BZip2Decoder.o BZip2Encoder.o BZip2Register.o Bcj2Coder.o Bcj2Register.o BcjCoder.o BcjRegister.o BitlDecoder.o BranchMisc.o BranchRegister.o ByteSwap.o CopyCoder.o CopyRegister.o Deflate64Register.o DeflateDecoder.o DeflateEncoder.o DeflateRegister.o DeltaFilter.o ImplodeDecoder.o ImplodeHuffmanDecoder.o LzOutWindow.o Lzma2Decoder.o Lzma2Encoder.o Lzma2Register.o LzmaDecoder.o LzmaEncoder.o LzmaRegister.o LzxDecoder.o PpmdDecoder.o PpmdEncoder.o PpmdRegister.o PpmdZip.o QuantumDecoder.o ShrinkDecoder.o ZDecoder.o 7zAes.o 7zAesRegister.o HmacSha1.o MyAes.o MyAesReg.o Pbkdf2HmacSha1.o RandGen.o WzAes.o ZipCrypto.o ZipStrong.o ArchiveCommandLine.o ArchiveExtractCallback.o ArchiveOpenCallback.o Bench.o DefaultName.o EnumDirItems.o Extract.o ExtractingFilePath.o HashCalc.o LoadCodecs.o OpenArchive.o PropIDUtils.o SetProperties.o SortUtils.o TempFiles.o Update.o UpdateAction.o UpdateCallback.o UpdatePair.o UpdateProduce.o BenchCon.o ConsoleClose.o ExtractCallbackConsole.o HashCon.o List.o Main.o MainAr.o OpenCallbackConsole.o PercentPrinter.o UpdateCallbackConsole.o UserInputUtils.o CRC.o CommandLineParser.o CrcReg.o IntToString.o ListFileUtils.o MyString.o MyVector.o MyWindows.o Sha1Reg.o Sha256Reg.o StdInStream.o StdOutStream.o StringConvert.o StringToInt.o UTFConvert.o Wildcard.o XzCrc64Reg.o ErrorMsg.o FileDir.o FileFind.o FileIO.o FileName.o PropVariant.o PropVariantConv.o Synchronization.o System.o TimeUtils.o myAddExeFlag.o mySplitCommandLine.o wine_date_and_time.o   -lpthread
make[1]: Leaving directory `/home/wwwroot/p7zip_16.02/CPP/7zip/Bundles/Alone'
[root@crifan p7zip_16.02]# make install
./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip 
- installing /usr/local/bin/7za
- installing /usr/local/man/man1/7z.1
- installing /usr/local/man/man1/7za.1
- installing /usr/local/man/man1/7zr.1
- installing /usr/local/share/doc/p7zip/README
- installing /usr/local/share/doc/p7zip/ChangeLog
- installing HTML help in /usr/local/share/doc/p7zip/DOC
[root@crifan p7zip_16.02]# 
</code>

然后确定有7z了:

<code>[root@crifan p7zip_16.02]# which 7za
/usr/local/bin/7za

</code>

没有7z:

<code>[root@crifan p7zip_16.02]# which 7z
/usr/bin/which: no 7z in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
</code>

然后去使用。

<code>[root@crifan p7zip_16.02]# 7za --help

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs x64)

Usage: 7za &lt;command&gt; [&lt;switches&gt;...] &lt;archive_name&gt; [&lt;file_names&gt;...]
       [&lt;@listfiles...&gt;]

&lt;Commands&gt;
  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
  rn : Rename files in archive
  t : Test integrity of archive
  u : Update files to archive
  x : eXtract files with full paths

&lt;Switches&gt;
  -- : Stop switches parsing
  -ai[r[-|0]]{@listfile|!wildcard} : Include archives
  -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives
  -ao{a|s|t|u} : set Overwrite mode
  -an : disable archive_name field
  -bb[0-3] : set output log level
  -bd : disable progress indicator
  -bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
  -bt : show execution time statistics
  -i[r[-|0]]{@listfile|!wildcard} : Include filenames
  -m{Parameters} : set compression Method
    -mmt[N] : set number of CPU threads
  -o{Directory} : set Output directory
  -p{Password} : set Password
  -r[-|0] : Recurse subdirectories
  -sa{a|e|s} : set Archive name mode
  -scc{UTF-8|WIN|DOS} : set charset for for console input/output
  -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
  -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands
  -sdel : delete files after compression
  -seml[.] : send archive by email
  -sfx[{name}] : Create SFX archive
  -si[{name}] : read data from stdin
  -slp : set Large Pages mode
  -slt : show technical information for l (List) command
  -snh : store hard links as links
  -snl : store symbolic links as links
  -sni : store NT security information
  -sns[-] : store NTFS alternate streams
  -so : write data to stdout
  -spd : disable wildcard matching for file names
  -spe : eliminate duplication of root folder for extract command
  -spf : use fully qualified file paths
  -ssc[-] : set sensitive case mode
  -ssw : compress shared files
  -stl : set archive timestamp from the most recently modified file
  -stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
  -stx{Type} : exclude archive type
  -t{Type} : Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
  -v{Size}[b|k|m|g] : Create volumes
  -w[{path}] : assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]{@listfile|!wildcard} : eXclude filenames
  -y : assume Yes on all queries
[root@crifan p7zip_16.02]# 
</code>

使用:

<code>7za a -t7z -r -bt www.crifan.com_allFiles_20180320.7z /home/wwwroot/www.crifan.com/*
</code>

开始压缩了:

<code>[root@crifan p7zip_16.02]# 7za a -t7z -r -bt www.crifan.com_allFiles_20180320.7z /home/wwwroot/www.crifan.com/*

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs x64)

Scanning the drive:
22931 folders, 102135 files, 7304054465 bytes (6966 MiB)                      

Creating archive: www.crifan.com_allFiles_20180320.7z

Items to compress: 125066

  1% 2064 + files/doc/docbook/docbook_dev_n . ase/pdf/docbook_dev_note.pdf.7z  
</code>

要压缩:

  • 12万个文件

    • 2万多个文件夹

    • 10万多个文件

    • 6G多

完整log:

<code>[root@crifan p7zip_16.02]# 7za a -t7z -r -bt www.crifan.com_allFiles_20180320.7z /home/wwwroot/www.crifan.com/*

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs x64)

Scanning the drive:
22931 folders, 102135 files, 7304054465 bytes (6966 MiB)                      

Creating archive: www.crifan.com_allFiles_20180320.7z

Items to compress: 125066

                                                                               
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/fop_java_lang_noclassdeffounderror_xmlgraphics_cygpath_bug_path_truncated/15/index-https.html

                                                                        
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/fop_java_lang_noclassdeffounderror_xmlgraphics_cygpath_bug_path_truncated/15/index-https.html.gz

                                                                               
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/make_makefile_recipe_for_target_failed_omit_error_while_executing_makefile/comment-page-1/index-https.html

                                                                              
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/make_makefile_recipe_for_target_failed_omit_error_while_executing_makefile/comment-page-1/index-https.html.gz

                                                                               
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/pass_existed_cookie_to_webbrowser_in_csharp/comment-page-1/index-https.html

                                                                               
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/pass_existed_cookie_to_webbrowser_in_csharp/comment-page-1/index-https.html.gz

                                                                               
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/unicodeencodeerror_gbk_codec_can_not_encode_character_in_position_illegal_multibyte_sequence/embed/index-https.html

                                                                         
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/unicodeencodeerror_gbk_codec_can_not_encode_character_in_position_illegal_multibyte_sequence/embed/index-https.html.gz

                                                                               
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/comment-page-1/index-https.html

                                                                             
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/comment-page-1/index-https.html.gz

                                                                            
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/feed/meta-wp-cache-8e7801ec28cb3c3e53909fc69f6112ca.php

                                                                           
WARNING: No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/feed/wp-cache-8e7801ec28cb3c3e53909fc69f6112ca.php

                                                                               
Files read from disk: 102074
Archive size: 5735005725 bytes (5470 MiB)

WARNINGS for files:

/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/fop_java_lang_noclassdeffounderror_xmlgraphics_cygpath_bug_path_truncated/15/index-https.html : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/fop_java_lang_noclassdeffounderror_xmlgraphics_cygpath_bug_path_truncated/15/index-https.html.gz : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/make_makefile_recipe_for_target_failed_omit_error_while_executing_makefile/comment-page-1/index-https.html : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/make_makefile_recipe_for_target_failed_omit_error_while_executing_makefile/comment-page-1/index-https.html.gz : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/pass_existed_cookie_to_webbrowser_in_csharp/comment-page-1/index-https.html : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/pass_existed_cookie_to_webbrowser_in_csharp/comment-page-1/index-https.html.gz : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/unicodeencodeerror_gbk_codec_can_not_encode_character_in_position_illegal_multibyte_sequence/embed/index-https.html : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/unicodeencodeerror_gbk_codec_can_not_encode_character_in_position_illegal_multibyte_sequence/embed/index-https.html.gz : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/comment-page-1/index-https.html : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/comment-page-1/index-https.html.gz : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/feed/meta-wp-cache-8e7801ec28cb3c3e53909fc69f6112ca.php : No such file or directory
/home/wwwroot/www.crifan.com/wp-content/cache/supercache/www.crifan.com/use_python_urllib-urlretrieve_download_picture_speed_too_slow_add_user_agent_for_urlretrieve/feed/wp-cache-8e7801ec28cb3c3e53909fc69f6112ca.php : No such file or directory
----------------
WARNING: Cannot open 12 files
</code>

然后去看看文件:

<code>[root@crifan wwwroot]# ll -lha
total 5.4G
drwxr-xr-x   6 root root 4.0K Mar 20 16:00 .
drwxr-xr-x.  5 root root 4.0K Sep  5  2017 ..
drwxr-xr-x   5 www  www  4.0K Dec  6 16:19 book.crifan.com
drwxr-xr-x   3 www  www  4.0K Sep 10  2017 crifan
drwx--S---  12 www  ftp  4.0K Mar 20 16:00 p7zip_16.02
-rw-r--r--   1 root root 4.1M Jul 14  2016 p7zip_16.02_src_all.tar.bz2
drwxr-xr-x  13 www  www  4.0K Mar 20 11:10 www.crifan.com
-rw-r--r--   1 root ftp  5.4G Mar 20 12:00 www.crifan.com_allFiles_20180320.7z
</code>

5.4G

去用ftp下载下来:

苏州移动

下载速度很不错:2MB/s

【总结】

用7z去压缩:

<code>7za a -t7z -r -bt output_filename.7z folder_to_compress/*
7za a -t7z -r -bt output_filename.7z file_to_compress
</code>

比如:

<code>7za a -t7z -r -bt www.crifan.com_allFiles_20180320.7z /home/wwwroot/www.crifan.com/*
</code>

转载请注明:在路上 » 【记录】CentOS下用7zip压缩文件去备份网站

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.187 seconds, using 22.20MB memory