WordPress Server Setup, Part III (old)

So far, using restic + rclone is the best solution for backing up data to cloud store. The free account of IDrive e2 got 10Gb capacity. Since the Wordpress web site is not going to have too much data, IDrive e2 is quite suitable.

overall setup

  • Create IDrive e2 account
  • Setup rclone for IDrive e2
  • Create restic repository for rclone
  • Config cronjob for daily backup
  • Config alias for restic with preset parameter

backup script

#!/bin/bash

DROOT=/home/clam/docker/wordpress
RPATH='rclone:idrive:restic'
TAG='wordpress-docker'

cd $DROOT
docker compose down
restic -r $RPATH backup -p ~/.restic  --tag $TAG $DROOT
docker compose up -d

cronjob (under root)

30 4 * * * /root/scripts/restic-idrive-docker.sh 2>&1

restic alias

alias irestic='restic -r rclone:idrive:restic -p ~/.restic'

example of using irestic

irestic snapshots   # check backup snapshot
irestic forget -l 10  # delete and keep last 10 backup
irestic prune    # repack and modifiy index for deleted files

reference

rclone with IDrive e2

https://www.idrive.com/e2/rclone

rclone with restic

https://www.reddit.com/r/rclone/comments/mez3x3/using_rclone_with_restic/

This page was last edited on 2025-01-13 07:12

Powered by Wiki|Docs

This page was last edited on 2025-01-13 07:12

Mac
To whom it may concern

Powered by Wiki|Docs