Creating large tar archives.txt

Creating and splitting large TAR files to copy by FTP: ----------------------------------------------------------- Type "tar --help" to get simple commands to create a tar file. Some servers do not support files over e.g. 2GB, then we have to split the file http://it.toolbox.com/blogs/locutus/split-files-with-tar-26311 To split tar file in 1200MB use this cmd: tar -cML 1258291 -f my_documents.tar my_documents Then it will ask if volume #2 for this archive is ready, to avoid overwriting first file, type this answer: n my_documents2.tar, press ENTER once and it will ask again, press ENTER AGAIN. Do the same for my_documents3.tar too. Now you can ftp files from one server to another, then to unzip that file use: tar -xMf my_documents.tar and when it asks for second archive answer with: n my_documents2.tar // no command TO TEST tar files ?! just -W or --verify which seems to only test it after creation But you can test by: cksum file.tar and compare the result on both servers to verify copy was OK. !!! To create a simple .tar file of a given directory, e.g "/big_thumbs": tar -cvf big_thumbs.tar big_thumbs This works in most cases, it should not compress the file. Another way to create and split tar: ==================================== This creates large archive files before spliting them so might not work on all servers tar -cvzf foo.tar.gz foo split -d -b1000m sample.tar.gz sample.tar.gz The generated files will start from sample.tar.gz00 so original file will remain unchanged, files will be 1GB each Join the split tar files: cat file1.tar.gz file2.tar.gz > bigfile.tar.gz REMEMBER THE ">" and destination file otherwise we got random characaters on screen :-s TEST a tar with output sumary (it does not extract when "t"): gunzip -t -v sample.tar.gz // the above methos shown crc error when finally testing archive over 2GB with gunzip -t // so maybe best is with first method by waiting and specifying next archive name: tar -cML 1258291 -f my_documents.tar my_documents after transfering compare file integrity with ssh cksum commands or similar checks.

1 Download (2.1 KB)

linux (1) unix (1) tar (1) archive (1) archives (1)