WhatsApp's backup to Google Drive doesn't work


Question

I recently reinstalled WhatsApp because it stopped working. Then, I restored the Google Drive backup. For this backup, I used my primary Google account. Restoring worked fine.



However, after restoring the backup, no new backups would work. It always just got stuck at some percentage of progress. After many failed attempts of canceling the backup after hours of being stuck at the same percentage, I added my secondary Google account to my phone and chose it as WhatApp's backup location. It then went on to make a 2.3 GB backup to the secondary Google account (according to the information WhatsApp stated). This backup again got stuck. Repeating it several times always made it get stuck at a higher percentage of progress.



Eventually, I gave up and deleted the backup in Google drive (secondary account). I noticed that my secondary account only used a few hundred MB in total, according to the information found in the bottom left corner of the Google Drive website.



After deleting the backup, I started another backup. WhatsApp showed that it already completed 2.3 GB of 4.6 GB right from the beginning. This got stuck again at 99%. After deleting the backup again and starting it again, it now started at 4.6 GB of 6.9 GB, apparently always increasing by 2.3 GB.



What should I do to perform a full backup?


Answer

The exact same happened to me, it would never finish uploading the backup to Google Drive and in every new attempt it would tell me that the backup size was bigger, start the upload and stop somewhere between 97% and 99%.



The only difference is this started happening spontaneously, it was successfully making and uploading backups every day and then one day, out of the sudden it couldn't finish uploading it.



After trying many of the suggestions that I found all over the Internet, like force stopping WhatsApp, clearing the cache, set it to use another Google account for backups, nothing helped.



At the end, the cause was the same issue pointed out in your last comment, I had a few corrupt 0 byte media files within WhatsApp's Media/ folder that couldn't be read, moved, copied or deleted: Operation not permitted.



I don't know how did that happen, but the best way I could get around it was to use a terminal App and run Linux commands for copying all non-corrupt files to a new folder:



cd WhatsApp
mkdir MediaCopies
cp -r Media/* MediaCopies


It will throw errors about the corrupt files but continue copying the good ones.



After checking MediaCopies/ looks right and contains all files then:



mv Media Media~
mv MediaCopies Media


Then open WhatsApp, poke around open pictures, videos, etc. and finally:



rm -rf Media~


It will fail to remove those corrupt files, but at least you won't have the rest of the files duplicated.



And voilà! No more issues uploading the backup.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes