Going the Distance
(2010)

Erin (Drew Barrymore) and Garrett (Justin Long) start a romantic relationship even though Erin is moving to California in a few weeks to go back to school to finish her Journalism degree.  They try to make a long-distance relationship work – Erin in San Francisco and Garret in New York. After a couple of months of trying to secure employment in New York, Erin is offered a job at a large San Francisco newspaper.  Initially Erin is going to turn the position down to move back to New York to be with Garrett but he realizes that he can’t ask her to give up her dream job for him.  They sadly break up.

Months later, Erin runs into Garret at a concert in California. He quit his New York job to manage a music band and has moved to Los Angeles.  They realized they still love each other and now being only a few hours away from each other, decide to give their relationship another shot.
 

Thanks sarriesleepers!