By default it will do a uni-directional transfer, but it accounts for duplicates and can be instructed to delete emails that don't exist on the originating side to have a more sync-like behavior. It also has a variety of filtering tools built in (ie. only transfer last week's emails, or only emails with a particular header).
If I sound like a fan-boy, it's because I am: I would not have been so comfortable in my work without having solid backs, it's saved me literally days of coding up specialized tools for various tasks and repairs, and saved me from dataloss more than once.
My workflow was to run a VPS with Dovecot and pull my email from my various accounts on to that, and then put the Dovecot maildir under git, and then occasionally bundle it up into a 7z archive with max compression (nowadays, I might look into xz) to pull onto an external hard drive.