Created
July 10, 2022 11:55
-
-
Save ralphscheu/1cd684dcad8ce4368967812bdf0734bc to your computer and use it in GitHub Desktop.
Remote Backup Script of Seafile userdata using seaf-fuse and rclone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ -z "$(ls -A /mnt/seafile-fuse)" ]; then | |
echo "Mountpoint /mnt/seafile-fuse empty, mounting Seafile using seaf-fuse.sh..." | |
echo "/opt/seafile/seafile-server-latest/seaf-fuse.sh start /mnt/seafile-fuse" | |
/opt/seafile/seafile-server-latest/seaf-fuse.sh start /mnt/seafile-fuse | |
fi | |
if [ -z "$(ls -A /mnt/seafile-fuse)" ]; then | |
echo "Failed to mount Seafile: /mnt/seafile-fuse still empty! Aborting..." | |
else | |
echo "Starting rclone backup..." | |
rclone sync --transfers 8 --fast-list /mnt/seafile-fuse/ b2crypt:seafile-fuse --verbose --log-file /root/b2_backup.log | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment