You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm playing with all of the options of imapsync in order to sync only the necessary, running sync multiples times on the same mailboxes.
I've synced a first time some mailboxes forgetting exclusion of "Contacts" folder which is present on host1 but I don't want to be synced on host2.
Then I've added --delete2folders, --exclude "^Contacts" and --exclude "^Contacts/*" to my command line. But running this new command did not delete the Contacts folders on host2 as I expected.
Ok, it's not a bug : "Contacts" is a real folder on host1, and delete2folders only delete folders that are not present on host1.
But, is there another option to delete excluded folders that have been wrongly synced earlier ?
If not, maybe you should add an entry on the Emptying FAQ about that ?
The text was updated successfully, but these errors were encountered:
=======================================================================
Q. How to delete some folders of an account with imapsync?
R. Use the same account on both sides with the options
--delete1 --noexpungeaftereach --delete1emptyfolders
like when deleting all folders BUT select only the folders
you want to delete by using options to select folders,
like --folder or --folderrec or --include or --exclude
Example, to delete the folder Blabla
imapsync ... --delete1 --noexpungeaftereach --delete1emptyfolders --folder Blabla
To delete the four folders Kalender Kontakte Aufgaben Notizen:
imapsync ... --include 'Kalender|Kontakte|Aufgaben|Notizen' \
--delete1 --noexpungeaftereach --delete1emptyfolders
I strongly recommend to use --dry first!
To get an overview of how to select folders, see
https://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Selection.txt
=======================================================================
I know imapsync can delete folders like this, but I think you should warn users that excluded folders are not deleted with delete2folders if they are present on host1.
During the preparation of the migration scenario, I've adjusted options when I've figured out that some folders should not be copied. Mailboxes used during this phase can still have unwanted folders at the end if we don't care.
--delete2folders : Delete folders in host2 that are not in host1.
Only the selected folders are considered, all folders by
default but not all with --exclude --include --folder etc.
For safety, first try it like this, it is safe:
--delete2folders --dry --justfolders --nofoldersizes
and see what folders will be deleted.
I'm playing with all of the options of imapsync in order to sync only the necessary, running sync multiples times on the same mailboxes.
I've synced a first time some mailboxes forgetting exclusion of "Contacts" folder which is present on host1 but I don't want to be synced on host2.
Then I've added --delete2folders, --exclude "^Contacts" and --exclude "^Contacts/*" to my command line. But running this new command did not delete the Contacts folders on host2 as I expected.
Ok, it's not a bug : "Contacts" is a real folder on host1, and delete2folders only delete folders that are not present on host1.
But, is there another option to delete excluded folders that have been wrongly synced earlier ?
If not, maybe you should add an entry on the Emptying FAQ about that ?
The text was updated successfully, but these errors were encountered: