How to fix slow “bup fuse” file copy using “bup restore”

If you are using bup fuse to mount a bup repo and then try to cp -r a directory from it you might have notice

bup restore is much much faster than using bup fuse. In my usecase with about 32k files of total size 1.3GB to restore, bup fuse took more than 2 hours, whereas bup restore was finished in under a minute.

Here’s an example

BUP_DIR=/tmp/my-website.bup/ bup restore wordpress/2023-08-01-000044/wordpress

Don’t know which path to enter here? Use bup ls to find out. Start at the top:

BUP_DIR=/tmp/my-website.bup/ bup ls

and then continue downwards the hierarchy until you’ve reached the folder you intend to restore:

BUP_DIR=/tmp/my-website.bup/ bup ls wordpress/
BUP_DIR=/tmp/my-website.bup/ bup ls wordpress/2023-08-01-000044
BUP_DIR=/tmp/my-website.bup/ bup ls wordpress/2023-08-01-000044/wordpress