Previously Deleted and Moved Edge Favorites Reverted to Prior State - Any way to restore favorites from specific date?

GraniteStateColin 146 Reputation points
2022-02-22T13:07:01.287+00:00

In what I can only assume is a bizarre and rare bug, sometime in the past few days, many old, previously deleted or moved favorites have returned to my Favorites in Edge. This happened across all my computers, so it must have been a problem at Microsoft's end, then sync'd out to my systems. I now have many duplicates, in cases where I had moved old favorites to other folders or subfolders. With many hundreds of favorites, manually fixing this would take a long time.

I have not seen any other reports of this happening. Is this a known issue? (I have reported it through Edge Feedback.)

To fix, is there any way to restore a previous Favorites state based on a date? For example, if I could just restore my Favorites as they existed 1 week ago, that would probably perfectly fix the problem (maybe there would be a small number of missing new favorites, but that would be better than what I have now)?

Thanks for any suggestions.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,310 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. GraniteStateColin 146 Reputation points
    2022-03-02T11:54:25.087+00:00

    Here is how I ultimately solved the problem. I hope this can help others. The big revelation for me was that Edge does indeed store "Snapshots" of all the data files at some interval. Armed with that knowledge, it was fairly simple to grab the old Bookmarks file, copy it into a Temp Profile, export it, then import it back into my main Profile, where everything promptly sync'd to the cloud and propagated to all my computers and Edge versions (Canary, Dev, Beta, and Release).

    These are the steps:

    1. Find the Snapshots folder of the profile for which you wish to restore a previous set of Favorites. This is at %LocalAppData%\Microsoft\Edge\User Data\Snapshots\, then select the date and/or Edge version you wish to restore (obviously, this may take some investigation or experimentation to know which is the right one). For me, even though the Snapshot I used was for Edge 97 and I'm now running Edge 98, everything worked fine.
    2. Copy the Bookmarks and Favicons files from the Snapshots folder of the profile used in Step 1 (or other data you want to restore, like History or Login Data) to someplace safe, like the Desktop or a temp folder. Note that Favicons shouldn't get lost in this process, but I wanted to grab it as a backup, just in case (losing hundreds of icons wouldn't stop the links from working, but sure is nice to retain them for finding the right Favorite faster).
    3. Launch Edge and create or confirm you have a usable profile with Favorites that you're fine to overwrite with this process. This should be separate from the one with the corrupted Favorites. Note the avatar icon used for the Profile in the upper right of Edge and be sure it's unique from your other Profiles. This is the easiest way to confirm you're working with the right profile later.
    4. You MUST then fully close Edge. Note that just closing it by clicking in the X in the upper right may not close it sufficiently. Confirm in Task Manager that Edge is not running.
    5. Go to %LocalAppData%\Microsoft\Edge\User Data\ and determine which Profile folder applies by simply opening each and looking at the Edge Profile.ico or Edge Profile Picture.png to find the one that matches the picture you noted in step #3.
    6. Copy the Bookmarks and Favicons you backed up in step # 2 into the temp profile at %LocalAppData%\Microsoft\Edge\User Data\Profile << number of profile to alter found in step #5>>.
    7. Open Edge and go to the temp Profile. Confirm you see Favorites here now from your backup. If you do not, something went wrong in an earlier step. Be sure you copied the file and fully closed and restarted Edge (the old Favorites will be cached if you don't completely terminate all Edge processes and then restart).
    8. Go to the Favorites menu and Export the Favorites. You can save this with a useful name and keep it for the future, saving you from needing perform the prior steps to get back to this particular backup.
    9. Switch to the Profile for which you are trying to restore your Favorites.
    10. Go to Manage Favorites in this Profile and delete everything. (It appears that this does not remove the Favicons file, which is good). This ensures when you import your old Favorites back, it won't just merge them with any problems you're trying to fix. However, if your only goal here is to get back lost Favorites, rather than remove duplicates (that was my problem), then no need to delete anything. Only delete if you don't want the current Favorites to survive this process.
    11. Not sure this was needed, but I waited until the deletion had synced, by confirming all Favorites were removed in the browser on another computer (you could also check the same profile in Dev or Beta versions on the same computer). To speed this process along, I went to edge://sync-internals/ and kept hitting Start and Trigger GetUpdates on this and another computer until I could confirm that all Favorites were gone on the other computer too. I then fully closed and confirmed Edge was not running in Task Manager, and restarted Edge, before returning to the Profile I was fixing/restoring. Again, not sure that was needed, but figured it couldn't hurt and didn't want to have to redo anything in case it was needed.
    12. Go to Manage Favorites and Import favorites from the Export performed in step # 8.

    In addition to possibly not needing Step #11, if you don't want to Sync (or maybe even if you do, not sure), you might be able to just copy the Bookmarks file directly into the destination Profile and skip everything with the Temp Profile and Exporting then re-Importing the Favorites. Just replace step 6 with directly pasting the Bookmarks file into the target Profile. I wasn't sure if the Sync process would recognize this as changes to the Bookmarks, which is what I assume triggers the sync updates to the Microsoft account. By Importing them from a standard Bookmarks file, it ensured that the Sync process would see them as updated and push the updates to the cloud so they'd download to my other systems. Possibly unnecessary.

    2 people found this answer helpful.

  2. XuDong Peng-MSFT 10,511 Reputation points Microsoft Vendor
    2022-02-23T08:32:43.887+00:00

    Hi @GraniteStateColin ,

    Based on your description, I did some searching on this issue and I didn't find an existing option to achieve this requirement, but you can try to achieve it with simple code. Here is the result of simple test.

    Just following these step:

    1. Open Microsoft Edge and navigate to edge://version/ and find the property Profile path.
    2. Find the Bookmarks file under this path in File Explorer according to the profile path in the first step(open with Notepad).
    3. Create an empty page (eg getFavorites.html), open the page and press F12 to open the dev tools.
    4. In devtools, choose console tab and copy these code below: var allFav = {......};
             var favLength = allFav.roots.bookmark_bar.children.length;  
             for (var i = 0; i < favLength; i++) {  
                 if (allFav.roots.bookmark_bar.children[i].date_added > '13289380120192546') {  
                     allFav.roots.bookmark_bar.children.splice(i, 1);  
                     i--;  
                     favLength--;  
                 }  
             }  
             var res = JSON.stringify(allFav);  
             document.body.innerText = res;  
      
      Finally copy the result from the page and cover the current Bookmarks file, then restart Microsoft Edge.

    Note : Replace the value of allFav with the contents of the Bookmarks file in the second step. And the specific time of the timestamp used in the code to judge is Tue Feb 15 2022 14:28:40 GMT, you can adjust it according to your own needs.

    Best regards,
    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.