NextCloud: Borg Backup to an Auto Mount Non-AWS s3fs on Debian 13
This article uses Beget S3 as an example of a non-AWS S3 bucket.
Setup
Install s3fs
sudo apt-get update
sudo apt-get install s3fs
Set Up Auto Mount
sudo mkdir /mnt/beget-s3
sudo vim /etc/s3fs-passwd
<Access key>:<Secret key>
sudo chmod 600 /etc/s3fs-passwdÂ
sudo vim /etc/fstab
# add curldbg for troubleshooting if needed
s3fs#1234567890-your-backup /mnt/beget-s3 fuse _netdev,auto,allow_other,use_path_request_style,url=https://s3.ru2.storage.beget.cloud,passwd_file=/etc/s3fs-passwd 0 0
Troubleshooting
If the auto mount does not work, check for s3 entries in the output of
sudo journalctl -b
If the output does not provide enough information to investigate, add curldbg to /etc/fstab option:
# add curldbg for troubleshooting if needed
s3fs#1234567890-your-backup /mnt/beget-s3 fuse _netdev,auto,allow_other,use_path_request_style,url=https://s3.ru2.storage.beget.cloud,passwd_file=/etc/s3fs-passwd,curldbg 0 0
Static IP
If your S3 has issues with mounting on boot (e.g. host not found), for me setting a static IP worked.