Sample Header Ad - 728x90

How to create split tar archive in multiple stages to save space?

3 votes
3 answers
2048 views
I have a very large folder that I am trying to create a tar archive of. The issue is I don't have enough extra free space to store the entire archive so I want to create say 100-200GB chunks of the archive at a time and transfer those individually to cloud storage. I need to be able to control when new chunks are created so my HDD doesn't fill up but all of the commands i've found to create split tarballs always create it all at once, in the same directory. The closest solution I found was from [this question](https://unix.stackexchange.com/questions/197464/how-to-create-multi-tar-archives-for-a-huge-folder) but all the responses base the archives on number of files, not size which is important for my use case as my file sizes are unevenly distributed.
Asked by Josh Harrison (53 rep)
Jan 7, 2021, 10:48 PM
Last activity: Jul 24, 2023, 03:05 PM