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

Restoring [split] app data backups (i.e. any backup >1GB) fails with error "Input is not in the .gz format" #1400

Open
3 tasks done
UntrimmedParasail opened this issue Jun 27, 2024 · 0 comments
Labels
Bug Something isn't working Feature: Backup Good First Issue Good for newcomers Priority: 3 Severity: 1 Status: Pending The issue is not yet accepted

Comments

@UntrimmedParasail
Copy link

UntrimmedParasail commented Jun 27, 2024

Please check before submitting an issue

  • I know what my device, OS and App Manager versions are
  • I know how to take logs
  • I know how to reproduce the issue which may not be specific to my device

I have searched existing issues for keywords: restore & gz

Describe the bug

App Manager splits Backup archive files at 1GB boundaries and uses the filename convention data<#>.tar.gz.<part>

Any attempt to Restore a backup (Internal Data+Cache), where the backup archive had been split, fails with an error "Input is not in the .gz format"

Note: All backup splits were verified to match the SHA-256 hashes contained in checksums.txt

Note: App Manager v4.x.x has NOT been tested (to see if the problem has been resolved)

Combining the split archive parts and updating checksums.txt allowed restore operations to succeed, without any errors; ie

$ cat data0.tar.gz.* > joined.tar.gz.0
$ rm data0.tar.gz.*
$ mv joined.tar.gz.0 data0.tar.gz.0
$ tar -tf data0.tar.gz.0

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Logs

A sample restore failure:
(Int Data+Cache, approx 3.54GB, 4x data0 files)

====> op=BACKUP_RESTORE, mode=2 pkg=(it.vfsfitvnm.vimusic, 0)
io.github.muntashirakon.AppManager.backup.BackupException: Failed to restore data files for index 0.
	at io.github.muntashirakon.AppManager.backup.RestoreOp.restoreData(RestoreOp.java:521)
	at io.github.muntashirakon.AppManager.backup.RestoreOp.runRestore(RestoreOp.java:200)
	at io.github.muntashirakon.AppManager.backup.BackupManager.restore(BackupManager.java:176)
	at io.github.muntashirakon.AppManager.batchops.BatchOpsManager.lambda$opBackupRestore$0$io-github-muntashirakon-AppManager-batchops-BatchOpsManager(BatchOpsManager.java:338)
	at io.github.muntashirakon.AppManager.batchops.BatchOpsManager$$ExternalSyntheticLambda0.run(Unknown Source:12)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)
Caused by: java.io.IOException: Input is not in the .gz format
	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.init(GzipCompressorInputStream.java:177)
	at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:147)
	at io.github.muntashirakon.AppManager.utils.TarUtils.extract(TarUtils.java:153)
	at io.github.muntashirakon.AppManager.backup.RestoreOp.restoreData(RestoreOp.java:518)
	... 9 more

Device info

  • Device: taimen (Pixel 2 XL)
  • OS Version: Android 12 (LineageOS 19.1)
  • App Manager Version: v3.1.6 [429] - F-Droid
  • Mode: Root (Magisk)

Additional context

I am posting this on behalf of someone else who doesn't have a GitHub account.

@UntrimmedParasail UntrimmedParasail added the Bug Something isn't working label Jun 27, 2024
@UntrimmedParasail UntrimmedParasail changed the title Attempting to Restore [split] app data backups (i.e. any backup >1GB) fails with error "Input is not in the .gz format" Restoring [split] app data backups (i.e. any backup >1GB) fails with error "Input is not in the .gz format" Jun 28, 2024
@MuntashirAkon MuntashirAkon added the Good First Issue Good for newcomers label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feature: Backup Good First Issue Good for newcomers Priority: 3 Severity: 1 Status: Pending The issue is not yet accepted
Projects
None yet
Development

No branches or pull requests

2 participants