Install autorestic with the below

curl https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash


Now we install the config with the below

cat <<EOF > /root/.autorestic.yml
version: 2

global:
  forget:
    keep-daily: 5
    keep-weekly: 15
    keep-monthly: 15

backends:
  storj:
    type: s3
    path: https://gateway.us1.storjshare.io/bucket.name.here
    env:
      aws_access_key_id: 
      aws_secret_access_key:
  backblaze:
    type: s3
    path: https://s3.us-west-002.backblazeb2.com/bucket-name-here
    env:
      aws_access_key_id: 
      aws_secret_access_key: 
locations:
  root:
    from:
    - /
    to:
    - storj
    - backblaze
    options:
      backup:
        exclude:
          - /dev
          - /media
          - /mnt
          - /proc
          - /run
          - /sys
          - /tmp
          - /var/tmp
          - /var/lib/mysql
          - /swap*
EOF

Now autorestic is installed


Run backup on all the below

autorestic backup -a

Prune all locations

autorestic forget -a --prune


Snapshots

View all snapshots

autorestic exec -av -- snapshots

Show files from snapshot

autorestic exec -av -- ls --long SNAPSHOT_ID PATH_TO_FILE_FOLDER

Restore specific files/folder

autorestic exec -v -b BACK_END -- restore latest --target /opt/restore/ --include /PATH/TO/RESTORE