CloudFlare的R2存储桶挂载

依赖 s3fs

安装

1
dnf install -y s3fs

AK SK

1
2
echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > ${HOME}/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs

挂载

1
2
3
4
5
s3fs blob-bak /mnt/r2 \
    -o passwd_file=~/.passwd-s3fs \
    -o url="https://xxxxxxxxxxx.r2.cloudflarestorage.com/" \
    -o nomultipart \
    -o endpoint=auto
updatedupdated2024-10-282024-10-28