by JF J.
Hi,
the problem here is only because you probably use a 32-bit system. If so, php will use 32 bit integers to store your backup file, limiting it to 2Gb.
You basically have 2 options:
Update your system to a 64 bits
Or modify the moodle core to dump the content of the zip to a stream (stdout) and than dump stdout to a file