Hummm.
Why are the aliens attacking. Are they after slaves, resources, a good fight?
BSG had a few plot holes you could drive a bus through with regard to why they were allowed to escape given that the Cyclons had faster and longer range jump drives and enough base ships to defeat all of the Human fleet.
Anyway you need to ask what would stop the aliens chasing after and wiping out the survivors.
If it is just in the system then what prevents the aliens from going away from Earth. Perhaps they were more heavily damaged than they let on. Perhaps they have enemies who are watching and who would attack them as soon as the invasion fleet left earth or split up.
Perhaps the aliens used jump tenders and a lot of non jump boats. A final suicidal attack by the remnant of the main fleet crippled the last of the alien jump tenders and in the weeks it took to repair them the survivors fled, as long as they keep moving the tenders and fleet chasing them can only go to where they were or could be. This makes killing any alien long range scouts critical.
Perhaps the aliens are split with one faction wanting to destroy the humans and another wanting to spare them. The aggressive faction was in control long enough to attack earth but now they are balanced and so the militant group can only sneak out small groups of ships to hunt the survivors.
You mention that humanity is fleeing to the moon and then outward. This would suggest the aliens have a significant limit to transport. Is this a colony ship, having used the last of its fuel to decelerate relative to earth and now launching huge waves of short range fighters, bombers and troop ships down to the planet?
Resistance from planet based defences and the national fleets could keep the attackers busy and away from the moon for a while and constant rebellions on earth would keep most of the alien ships there meaning that only a limited number of long range warships could hunt the survivors.
This also means that the outer colonies, the science posts and mining outposts would be fairly safe for a while and if heavily defended could resist any alien attack until such time as the aliens crush all earth resistance and can release more long range ships.
So you could have a small number of fortress asteroids or moons. Each linked to the others by long deep space routes. Mining outposts working flat out to produce everything needed to support the survivors while keeping quiet. A handful of colonies packed far beyond capacity and ringed with hastily built defence platforms and the surviving warships. Chemical refineries at the gas giants, water from Ice asteroids, protein paste grown and harvested at an experimental farm on mars.
All just out of reach of all but a handful of the alien ships. Some well defended, others relying on stealth. Warships that dare not move away from the colonies which are packed full of the civilians in case of an alien fast raid.
Plenty of work for independent crews, lots of vital cargos to be moved quietly, patrols to find and chase of the alien long range ships, new resources to find and exploit (lots of mouths to feed), contact with earth to be maintained, the aliens colonisation to be slowed down as much as possible because when earth if finally crushed the survivors are next.