0

I want to use rsync to perform daily backups from one USB 3 SSD drive to another. However, my Raspberry Pi 4 is overwhelmed by the task, and the file transfer speed is very low (I assume it's due to the power consumption or otherwise limited USB capabilities). Is there a simple way to use rsync such that files are read from the source drive into RAM and copied from there to the target disk, but without parallelism, i.e. without that the data is read while being written at the same time?

Many thanks!!!

1 Answer 1

1

In order to assess what is causing the slowdown, you can use a tool like dstat to work out what kind of resources are being exhausted. You could also play with the cables, USB ports and disk controllers to work out if there's a fault somewhere.

A possible answer to your question, provided you have sufficient RAM, is using a file system in memory; transfer the files over from the 1st disk to that file system, move them back to the 2nd disk and tear down the RAM file system.

# mkdir -p /mnt/ramfs # mount -o size=<SIZE>M -t tmpfs tmpfs /mnt/ramfs # rsync <options> <disk1> /mnt/ramfs/ # rsync <options> /mnt/ramfs/* <disk2> # umount /mnt/ramfs 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.