-
Notifications
You must be signed in to change notification settings - Fork 741
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
Extracting backup with tar fails #1472
Comments
GNU tar doesn't support our custom extensions for tar. We will not be able to fix external applications. |
Please provide a log if you are unable to complete TWRP restoration. |
Why use custom tar? Can we not just make partition images with dd? |
It wouldn't be as efficient for storing files in large partitions. |
Then system images can be compressed or conv=sparse dd option can be used?
I'm not sure on the benchmarks.
…On Mon, Sep 2, 2019, 3:01 PM bigbiff ***@***.***> wrote:
It wouldn't be as efficient for storing files in large partitions.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1472?email_source=notifications&email_token=AB46VXWYH6HOMY3OVSQE2KLQHVPJ5A5CNFSM4HTZY462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5WNCNA#issuecomment-527225140>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB46VXWBAWZMXUK2KDHS3WDQHVPJ5ANCNFSM4HTZY46Q>
.
|
Is there any way to extract a single file (or a handful of files) from a backup, rather restoring the whole thing? Is that documented anywhere? |
Got it. For anyone else who needs to extract a single file (or a few ones) from a backup:
|
This is not very user friendly at all. extracting the backups on device and then painstakingly copy to PC via ADB archive by archive (due to device storage size constraints) is not a good option. if TWRP insists on using a custom TAR thing, please provide a compiled binary for PC side extraction... |
Hello, I had checked the sha's by sha256sum -c data.ext4.win000.sha2 command. It gives me the OK, status. The very similar situation is described in this issue: #1279 |
In which version of TWRP was it originally where the custom extensions for tar were added? I was having the same issue as @kaklik : getting the error "invalid tar format" trying to extract a system backup. But then, absurdly, I went back and tried creating fresh system backups using each of TWRP 3.2.3, 3.3, 3.4, 3.5, and 3.6.2, and tried to extract these with GNU tar, and I could no longer reproduce the error. When exactly are these custom extensions used? All the time, or under certain conditions? I guess it's possible that there was simply something wrong with my prior system backup, but it'd still be helpful to know. Unfortunately, I've either copied over the prior system backup that was causing that error to be thrown, or I've not thoroughly followed my exact previous steps to reproduce the problem. I'd still like to have answers to my questions, if possible -- maybe it will help me reproduce the issue again! |
I have built the TWRP version of See also #1618 |
It doesn't seem to happen with every backup, though. Were you getting the error, then compiled it yourself and it fixed your problem? |
@mmortal03 The error I was getting was similar to OP's. Using GNU tar on Ubuntu I get errors like this:
Edit: The TWRP patches can be seen in this diff simon816/libtar-twrp@ff3b40d I think I suspect it depends on what features your backup includes - whether selinux and e4crypt specific attributes were included. For my use case I wanted a clean offline extraction of the backups, building the custom Edit 2: This was for a
In a backup of |
shows files
tar: invalid tar format Stuck with extracting programs data. I have a 2 months full backup that works ok but outdated critical applications data and recent backup of data but with it I have a bootloop. Spent ~26 hours trying to make it work. Can't mount backups, can't extract, copying directly from backups to /data/data leads to crashing applications which data I trying to restore. Dead cycle. UPD: installed busybox to magisk then used busybox tar successfully |
Device codename: Gemini
TWRP version: 3.3.1-0
WHAT STEPS WILL REPRODUCE THE PROBLEM?
Create a backup via the TWRP UI, try to extract it via
tar xvf data.ext4.win000
.WHAT IS THE EXPECTED RESULT?
The backup should be extracted without any problems.
WHAT HAPPENS INSTEAD?
Tar aborts with the following error log:
Is there any way to recover the backup file? What happened? The shasums are all ok.
The text was updated successfully, but these errors were encountered: