JFS_BASE=/Users/yujunz/JuiceFS
JFS_NAME=rogerz-s3-cn-east-1-qiniu
BUNDLE=TimeMachine.sparsebundle
VOLUME=/Volumes/TimeMachine
# Mount JuiceFS
juicefs mount --cache-dir $JUICEFS_BASE/cache --batch 10 --writeback --metacache --opencache $JFS_NAME $JFS_BASE/$JFS_NAME
# Create sparse bundle
hdiutil create -size 600g -type SPARSEBUNDLE -fs "HFS+J" $BUNDLE
mv $BUNDLE $JFS_BASE/$JFS_NAME
# Attach and set as time machine destination
hdiutil attach -mountpoint $VOLUME $JFS/$BUNDLE
sudo tmutil setdestination -a $VOLUME
Force umount
➜ JuiceFS umount rogerz-s3-cn-east-1-qiniu
umount(/Users/yujunz/JuiceFS/rogerz-s3-cn-east-1-qiniu): Resource busy -- try 'diskutil unmount'
➜ JuiceFS diskutil umount rogerz-s3-cn-east-1-qiniu
Unmount failed for rogerz-s3-cn-east-1-qiniu
➜ JuiceFS umount -f rogerz-s3-cn-east-1-qiniu