seedvault icon indicating copy to clipboard operation
seedvault copied to clipboard

Automatic backups happen despite backup disabled

Open foss- opened this issue 2 years ago • 35 comments

LineageOS 19.1 2022-06-06 Seedvault 12-3.0

Ran Seedvault backup once. Now want to use it only on demand when started manually. However I get daily error messages about failed backup runs.

Backup my apps: off Backup my files: off

Error message: Backup error: A device backup failed to run. Fix.

Clicking on Fix opens Seedvault settings.

logcat, 1 year

The USB drive used in initial backup is not plugged in. Seedvault seems to be complaining about that. But I don't understand how to stop it from thinking I want automatic backups.

foss- avatar Jun 09 '22 15:06 foss-

Does it still happen after turning Backup my apps on and off again?

grote avatar Jun 10 '22 17:06 grote

Done, lets wait and I'll report back. UPDATE: just received another failed backup info. And they keep repeating on a daily basis.

foss- avatar Jun 10 '22 17:06 foss-

Is there anything else that can be provided to help moving this forward?

foss- avatar Jun 25 '22 16:06 foss-

Would be nice to see an option to enable/disable automated backups.

ghost avatar Jun 26 '22 16:06 ghost

Can you try re-setting your backup location? It is on a flash drive, right?

If that doesn't help, please provide logs when doing this resetting and ideally right after you get an error.

grote avatar Jun 27 '22 18:06 grote

Backup location was a USB drive. How is backup location reset? Tapping Backup location shows some backup options but no reset option.

foss- avatar Jun 27 '22 19:06 foss-

Just re-select the same drive after inserting it.

grote avatar Jun 28 '22 13:06 grote

Logcat after seeing error is in reports first post. Connected the USB drive and re-selected it under backup location. Disconnected drive and now waiting to see if the issue is persisting. Logcat while doing reset (1 year): https://bin.disroot.org/?baacc8f40a812c50#FgbGESvFTSLisVjUSVTZdRmHSfwVfaqiw32ZdSC77GFV Reset was done 06-29 09:46:10

foss- avatar Jun 29 '22 07:06 foss-

Potentially relevant part:

06-29 09:46:13.967 31025 31025 D ExternalStorage: After updating volumes, found 2 active roots
06-29 09:46:13.968  2303  2303 D StorageNotification: Notifying about public volume: VolumeInfo{public:8,98}:
06-29 09:46:13.968  2303  2303 D StorageNotification:     type=PUBLIC diskId=disk:8,96 partGuid= mountFlags=0 mountUserId=0 
06-29 09:46:13.968  2303  2303 D StorageNotification:     state=UNMOUNTED 
06-29 09:46:13.968  2303  2303 D StorageNotification:     fsType=vfat fsUuid=C85D-1413 fsLabel=UNTITLED 
06-29 09:46:13.968  2303  2303 D StorageNotification:     path=/mnt/media_rw/C85D-1413 internalPath=/mnt/media_rw/C85D-1413 
06-29 09:46:13.979  2303  2303 D StorageNotification: Notifying about public volume: VolumeInfo{public:8,98}:
06-29 09:46:13.979  2303  2303 D StorageNotification:     type=PUBLIC diskId=disk:8,96 partGuid= mountFlags=0 mountUserId=0 
06-29 09:46:13.979  2303  2303 D StorageNotification:     state=BAD_REMOVAL 
06-29 09:46:13.979  2303  2303 D StorageNotification:     fsType=vfat fsUuid=C85D-1413 fsLabel=UNTITLED 
06-29 09:46:13.979  2303  2303 D StorageNotification:     path=/mnt/media_rw/C85D-1413 internalPath=/mnt/media_rw/C85D-1413 
06-29 09:46:13.982 31025 31025 D ExternalStorage: After updating volumes, found 2 active roots
06-29 09:46:13.983 31025 31039 W DocumentsProvider: Failed during query
06-29 09:46:13.983 31025 31039 W DocumentsProvider: java.io.FileNotFoundException: No root for C85D-1413
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at com.android.externalstorage.ExternalStorageProvider.getRootFromDocId(ExternalStorageProvider.java:447)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at com.android.externalstorage.ExternalStorageProvider.getFileForDocId(ExternalStorageProvider.java:411)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at com.android.externalstorage.ExternalStorageProvider.getFileForDocId(ExternalStorageProvider.java:406)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at com.android.internal.content.FileSystemProvider.getFileForDocId(FileSystemProvider.java:684)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at com.android.internal.content.FileSystemProvider.includeFile(FileSystemProvider.java:598)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at com.android.internal.content.FileSystemProvider.queryDocument(FileSystemProvider.java:371)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at android.provider.DocumentsProvider.query(DocumentsProvider.java:924)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at android.content.ContentProvider$Transport.query(ContentProvider.java:272)
06-29 09:46:13.983 31025 31039 W DocumentsProvider: 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107)

However, both logcats miss log output by Seedvault which makes this hard to debug.

grote avatar Jun 29 '22 13:06 grote

What do I need to provide to help out? Have you tried reproducing on your side by setting up and removing a USB drive? I am still waiting for the error to happen currently but since it is triggered daily iirc I should know more in a bit less than 24h.

foss- avatar Jun 29 '22 14:06 foss-

I think there was no notification about backups for a while. Just updated LineageOS nightly and was greeted with the known notification about backup error after the reboot.

foss- avatar Jul 04 '22 08:07 foss-

The Android backup API has no way to stop automatic backups, but we hack around it. This seems for some reason not to work in your case. Maybe only stops working after rebooting the device?

grote avatar Jul 04 '22 11:07 grote

Wondering if non automatic backups would be a better default then along with an option to enable automatic backups. Indeed after rebooting the device I get the frequent bacakup errors with no way to stop automatic backup.

foss- avatar Jul 07 '22 12:07 foss-

Still seeing daily alerts / notifications. The situation would not be as problematic, if it was a dedicated app for which I could customize notifications. But since seedvault is baked into the system, I think that is not possible or at least I couldn't find an option.

foss- avatar Jul 16 '22 09:07 foss-

As a workaround, you could disable app backups completely, that should stop the notifications and then only enable when you actually plugged your drive in and want to do a backup.

Maybe the system isn't recognizing your flash drive as a removable drive!?

From the log above it seems there's something wrong with the drive, e.g. it is in state BAD_REMOVAL . Did you try running fsck on it?

grote avatar Jul 17 '22 19:07 grote

As a workaround, you could disable app backups completely, that should stop the notifications and then only enable when you actually plugged your drive in and want to do a backup.

Would love to disable backups completely but I am unable to find an option to do that.

From the log above it seems there's something wrong with the drive, e.g. it is in state BAD_REMOVAL . Did you try running fsck on it?

Not knowingly. Maybe I unplugged before doing some removal dance first? I am not very experienced with usage of LineageOS and removable USB drives, so might have done something stupid while unplugging. But happy to completely disable backup until I need it again.

foss- avatar Jul 17 '22 21:07 foss-

Would love to disable backups completely but I am unable to find an option how to do that.

In the "App backup" category, there's no setting for "Backup my apps"?

grote avatar Jul 19 '22 13:07 grote

For unknown reasons Backup my apps was on again. Disabled it now, but I think this will not prevent the error notifications from showing. Lets see in the coming days.

Note that per the initial report that setting was off and backup error notifications were still happening: Backup my apps: off Backup my files: off

foss- avatar Jul 19 '22 16:07 foss-

Notifications about backup errors still incoming despite both options being set to off.

foss- avatar Jul 20 '22 16:07 foss-

Wow! Do you have maybe a work-profile or different user set up?

grote avatar Jul 25 '22 20:07 grote

Not yet. You think it's worth setting up a second user to see if the behavior is reproducible? Edit: So you think this is not a general problem but device specific or even limited to my setup? Was also wondering if this happened to all users, would expect to see more reports about this. However I am still not sure how to handle this and am getting disturbed during work multiple times per day.

foss- avatar Jul 25 '22 21:07 foss-

You think it's worth setting up a second user to see if the behavior is reproducible?

No, I just wonder why the system is scheduling backup runs when backup is disabled, so I was thinking that they maybe come from another user or work profile.

grote avatar Aug 02 '22 16:08 grote

Oh right, I can rule that out. So you believe this is not a general problem but specific to my setup or device?

Is there any way to reset or nuke SeedVault to get to a pristine state, hopefully eradicating whatever is currently hanging or got the wrong flag or tag stuck?

foss- avatar Aug 02 '22 17:08 foss-

Yesterday I upgraded form LOS 18.1 to 19.1 - phone Pixel 4a5g. With both "Backup my apps" and "Backup my files" disabled I get the "Backup Error" message after every boot and when it tries to run an automatic backup.

My workaround is to "Force Stop" Seedvault after booting.

syborgxx avatar Aug 03 '22 19:08 syborgxx

My workaround is to "Force Stop" Seedvault after booting.

Care to share how that would be done?

foss- avatar Aug 03 '22 19:08 foss-

Go to Settings then search for seedvault. Click on the result and "Force stop."

syborgxx avatar Aug 03 '22 20:08 syborgxx

Go to Settings then search for seedvault. Click on the result and "Force stop."

This does not prevent the notifications about failed backups for me.

foss- avatar Aug 07 '22 13:08 foss-

Try freezing Seedvault with Titanium Backup.

On August 7, 2022 6:03:09 AM PDT, foss- @.***> wrote:

Go to Settings then search for seedvault. Click on the result and "Force stop."

This does not prevent the notifications about failed backups for me.

-- Reply to this email directly or view it on GitHub: https://github.com/seedvault-app/seedvault/issues/416#issuecomment-1207403963 You are receiving this because you commented.

Message ID: @.***> -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

syborgxx avatar Aug 07 '22 19:08 syborgxx

Maybe this is a LineageOS specific issue as all users who reported this are on it. If backup my apps and files backup is off, seedvault should never run and never post notifications.

To further debug this, the output of those adb commands would be helpful:

adb shell bmgr activated
adb shell bmgr list transports

grote avatar Aug 22 '22 20:08 grote

Thanks for following up on this issue - much appreciated.

Requested output:

  • adb shell bmgr activated Backup Manager currently activated
  • adb shell bmgr list transports com.android.localtransport/.LocalTransport * com.stevesoltys.seedvault.transport.ConfigurableBackupTransport

foss- avatar Aug 23 '22 15:08 foss-