Saturday, January 18, 2014

Create a tar archive split into blocks of a maximum size

Let's say you have a lot of data and instead of a big tar file you want smaller ones.
Let's say that you want 200MB files. Very simple, just type
tar cvzf - dir/ | split --bytes=200MB - sda1.backup.tar.gz
NOTE that to untar you have to cat the files before:
cat sda1.backup.tar.gz.* | tar xzvf 

Credits to Jordanm for post

No comments:

Post a Comment