question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for split archives

See original GitHub issue

I could use mounting split tar archive created like this: tar cf - ./folder | split --bytes=500MB - archive.tar.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mxmlnkncommented, Apr 10, 2022

I implemented a prototype on the develop branch. You can try it out with:

python3 -m pip install --user --force-reinstall 'git+https://github.com/mxmlnkn/ratarmount.git@develop#egginfo=ratarmountcore&subdirectory=core'
python3 -m pip install --user 'git+https://github.com/mxmlnkn/ratarmount.git@develop#egginfo=ratarmount'

It can detect decimal, hexadecimal, and alphabetical split extensions of arbitrary length. But it assumes that the split extension sequence either begins at 0 or 1 even though split theoretically allows setting FROM higher than 1. Furthermore, by default split will create files without any dot but ratarmount will only look for extensions, i.e., the prefix given to split is required to end with . for compatibility.

It does not yet work recursively if there is a split archive inside another archive but I’ll probably implement that before a release.

I also decided to make the split file detection the default behavior and offer a --no-detect-split option. This option is also not yet implemented.

You can try it out with:

base64 /dev/urandom | head -c $(( 64 * 1024 )) > random
tar -cf- random | split --bytes=32K --numeric-suffixes=1 --suffix-length=3 - random.tar.
ls -la
# random.tar.001
# random.tar.002
# random.tar.003
ratarmount random.tar.001 mountPoint
diff -s random mountPoint/random
# Files random and mountPoint/random are identical

In this example, I specified the .001 file but it also works with any other part, e.g., .002. It even should work when specifying all of the parts ratarmount random.tar.[0-9][0-9][0-9] mountPoint. But the parts should not be interspersed with other archives to be union mounted because the order is important for the resulting merged view. E.g.: ratarmount foo.tar random.tar.001 bar.tar random.tar.002 mountPoint. In that case, ratarmount will print an error because the “same” random.tar archive appears at conflicting positions.

0reactions
mxmlnkncommented, Jun 11, 2022

Closed with d5bb6e4 in master. The release should follow in the next weeks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Work With Multipart Zip Archives and Split Files?
In this tutorial, we'll learn how to split files, create archives right away in parts, and then restore the original content. 2. Splitting...
Read more >
Splitting Zip files - WinZip
Open the Zip file. Open the Tools tab. Click the Split Size dropdown button and select the appropriate size for each of the...
Read more >
How to split an archive - PKZIP & SecureZIP - Support
Right click on the file you wish to split and select Add to New Archive · Click the dropdown box for split size...
Read more >
How to split zip archive into multiple blocks of a specific size
First, use the zip command to combine the split zip files into a single zip archive.
Read more >
Split Files larger than 2GB using 7zip
General Instructions. back to top. TUF supports the upload of files via HTTPS (preferred and easiest method) and/or SFTP. Files ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found