Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appending (updating TOC) not possible #1

Open
c0xc opened this issue Apr 23, 2020 · 0 comments
Open

Appending (updating TOC) not possible #1

c0xc opened this issue Apr 23, 2020 · 0 comments
Assignees

Comments

@c0xc
Copy link
Owner

c0xc commented Apr 23, 2020

In TOCTAR, there are two ways to store files on a tape which already contains a backup archive: The "real" append function would update the TOC and then ask tar to append files to the end of the archive, within the same archive file. Then, there's a function called "auto-append", which detects existing TOCTAR archives to skip over them and create a new backup archive in a new tape file. In other words, you'd create a new archive in a new tape file after the previous/last tape file.

The point of a "real append" is that the TOC stays at the beginning of the tape, allowing fast directory listings, in case the appended files belong in the same archive. That way, the "list" function would print out a complete file list within seconds. The downside is that the TOC must be overwritten.

The real append is a feature that works with random-access media (files) but, sadly, not with tapes. After replacing the TOC, the tape is positioned at the following block, not at the end of the archive. After closing the file handle, a file mark has been written at that position, truncating the archive (cutting it in half, destroying it, insert other bad verbs).

On the other hand, (auto-)appending a new archive, i.e., creating a new tar archive with its own TOC, is always safe to do and works well on tapes. Since no TOC update is required, it's just like creating a new file. This is the safe option for tapes. Generally, it can be used to append a new archive to the tape (rather than appending files to an existing archive) if the added files don't belong in the old archive.

@c0xc c0xc self-assigned this Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant