Carlos ... you've posted the same question in both this forum (Developer) and in Moodle Partners. Your profile does say initial developer but are you a true developer?
Am not a developer myself ... just an experienced admin with 'interesting projects' from time to time.
Questions for you ... clarification ...
What operating system is server under? Linux ... if so what distro? Ubuntu/CentOS?
Is the server a standalone? ... code, DB server, and moodledata on same physical server?
How much space do you have available?
Do you have need of keeping a full backup of all courses for records retention purposes?
Have you looked into resetting courses?
Briefly, I have moved 3794 reset courses ... nu.mbz's ... from an old server to a new server where new server had same categories ... all courses in same cat's as they were in old server in the time span of 8 hours. All of it command line with a combination of bash shell scripts that used scripts residing in /moodlecode/admin/cli/, moosh, and scp from old to new server.
Not bragging ... BTW.
So depending upon answers to questions above I can give you a brief overview.
'spirit of sharing', Ken
Unless some true Developer or Moodle Partner cares to jump in here!
'spirit of sjaring', Ken