Backup Backblaze

Date: []

.sh (/usr/local/bin)

#!/bin/bash

NOW=$(date  +"%Y-%m-%dT%H%M%S%z")

SOURCE=/home/USER/.backup/rclone
DEST=backblaze:BUCKET

rclone sync $SOURCE ${DEST}/FOLDER \
    --fast-list \
    --exclude "*.exclude" \
    --delete-excluded \
    --links \
    --progress -v \
    --backup-dir ${DEST}/FOLDER-old/${NOW}

.service

[Unit]
Description=Backup de upload a Backblaze

[Service]
Type=oneshot
User=USERNAME
Environment=RCLONE_CONFIG_PASS=PLAIN-TEXT-PASSWORD
ExecStart=/usr/local/bin/backup-backblaze.sh

[Install]
WantedBy=multi-user.target

.timer

[Unit]
Description=Backup de upload a Backblaze

[Timer]
OnCalendar=*-*-* 15:30:00

[Install]
WantedBy=timers.target