Copying thousands of emails to local folders and to IMAP folders in Gmail
I have have had a Gmail address for a few years and have just created a new Gmail address, I am trying to copy about 20,000 emails from the original Gmail IMAP folders to local Thunderbird folders as a backup, and then copy them to the new Gmail address IMAP folders.
I have tried copying these in smaller amounts as suggested (between 200 and 500 at once) This seems to go well, however, when I have completed the task the original folder has a much higher amount of messages in it than the new one, so some messages are being lost along the way.
Is there a reliable method to do this, such as closing Thunderbird and then copying and pasting data held in the profile folder, or does it need to be done with Thunderbird running?
Many Thanks in advance
Alle antwurden (7)
I suggest you use Thunderbird filters rather than conventional copy or drag and drop.
Thanks Wayne, please could explain how to do this? I would like to move all the emails from each year into a folder named after that year, so for instance, I have created a local folder called "2020" and I only want the inbox messages from that year to be copied to that local folder, and then copied from that local folder into the new IMAP folder with the same name for the new email address.
TRy this: Would recommend you do a 'Copy to' because it will not delete anything off the original imap folder, so if a problem occurs at least you can redo it.
- Tools > Message Filters
- Click on New'
- Give suitable name eg: Move by Date
- Select 'Manually Run'
- Uncheck 'Getting new mail'
- Select 'Match all of the following'
- 'Date' and 'is before' and insert date such as 01/01/2021
- Click on the far right + icon to create another line
- 'Date' and 'is after' and insert date such as 31/12/2019
Perform these actions:
- 'Copy message to' - click on drop down hover over 'Local Folders' and select '2020'
- click on 'OK'
The Filter called 'Date Move' is now in the list.
At the bottom of Message Filters:
- On far right is 'Filter Log' button - click on it
- Top right select checkbox: 'Enable the Filter Log'
- then click on 'Close'
- 'Run selected filter on:' Choose 'Inbox on mail account name'
- Now - in list - select the 'Date Move' filter so it has a tick in checkbox as enabled and it is highlighted.
- Click on 'Run Now'
You may need to wait a while until it has completed and I suggest you do not select and view emails in Inbox whilst this occurs. Then you can check the Local Folders > 2020 folder I suggest you do check that you can read emails. So ensuring you do have full copy and not just headers. You can also the 'Filter Log' to see what was copied.
Once this has been done, you can use the same filter - just modify the year as required. But remember to create the necessary folders in Local Folders first.
After you are completely sure you have full copies of all emails in the 'Local Folders' account, then you can delete emails from the old gmail account. Remember to compact folders after performing a deletion as this will completely clean up files in Thunderbird profile.
When coping everything back onto the new gmail email address...I would consider whether that is a real necessity. It will use up a load of your gmail quota. But useful if you need to see years of emails in another IMAP account on another computer or phone that accesses server. You will find that using imap to upload emails back onto a server has limits on how much is allowed, so you may find it takes a while. Upload with Imap has a 500mb per day https://support.google.com/a/answer/1071518?hl=en
All emails in the 'Local Folders' are still visible and accessible. They are also now only stored on your computer, so it's easy to backup. Maybe you only need to upload recent mail, but not all. Basically keeping emails in 'Local Folders' like an Archive. But if you pt emails back onto server - I would advise you only 'Copy to' imap folder, so keeping the 'Local Folders' account as an independent copy of all your emails. Again if something goes wrong then you can retry. If you choose to no upload everything, it means your new gmail account will only have all new incoming mail. Anything in an imap account cannot be truelly regarded as independent copy of server. After all an imap account can only show what is on server and all imap folders synchronise with server.
Hope this info helps.
Thanks Toad-Hall I am trying what you said and it appears to be working slowly, the folder in question has about 5000 emails in it, so I will check the progress tomorrow and let you know.
As I have already been moving messages into the destination folder manually and I don't want to delete them in case this doesn't complete sucessfully, I am going to have a lot of duplicate messages, so I will attempt to clear the copies with the "Duplication Remover" addon after the message filter has finished running, or is there a better duplicate remover that you know of?
There are two https://addons.thunderbird.net/en-US/thunderbird/addon/duplication-remover/ and https://addons.thunderbird.net/en-US/thunderbird/addon/removedupes/ which is far more popular. I can't vouch for either one.
If speed or responsive is an issue while the messages are being copied, you can turn off global search indexing and then turn it back on when copies are done.
Update, I left the filter running last night and checked it this morning to find it had failed at about 3500 of 5600 emails, so I have tried it again and it has failed at a similar point. I will try it again using about half as many and let you know how it goes.