I'm running a ZFS backup server (with deduplication) to backup websites and store them with retention. To do this, I transfer all files to the backup server during the first backup, and make a copy of all those files to create one set to keep, and one set to rsync the backup of the next day with.
However, creating a local copy of all those files takes a long time, >3 hours with only 15 GB data, while transferring it from another server takes only half an hour. This is probably because the "cp" command reads one (small) file at a time and writes it to storage, which takes hours on mechanic disks and their seek times (raidZ with 3 disks).
This will probably be fixed if the copy would first read a bunch of data to memory, and then writes it, instead of doing it file per file, but how do I do that?