From a Toolserver account? just query the db or from a non toolserver use, probably just the API from the wmf servers but if you cause too much load you would get blocked.
The article text can not be fetched from the database on the toolserver.
Using the API would work just as wqell as Special:export, as long as as many pages are fetched at a time as possible. One request per page would suck.
-- daniel