From d1ecf936108912302a8b618a74067c7946cb5604 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Tue, 22 Apr 2025 10:40:05 -0400 Subject: [PATCH] feat: README updates to reflect single script usage. --- README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e5bf31c..b18e23b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A script to backup docker volumes and stack configuration on the servers. 1. Copies the result to the `/backups` folder. 1. Cleans up / removes temporary directory that was created. 1. Restarts all the services. +1. Removes backups older than 7 days. ## Setup @@ -21,7 +22,7 @@ stored in. This is done by editing the `/etc/fstab` file, and adding the following line. ```bash -///docker/backups/ /backups cifs credentials=/home/michael/smbcredentials,uid=0,gid=0 0 0 +///docker/backups/ /backups cifs credentials=/path/to/smbcredentials,uid=0,gid=0 0 0 ``` Once that is done: @@ -66,11 +67,21 @@ sudo systemctl start backup.service ## Restore -This repository also contains a restore script that can restore the stacks and +The backup script also contains a restore command that can restore the stacks and volumes from a backup (hopefully it's never needed!). ### Usage -1. Download the script `wget https://git.housh.dev/homelab/backup/raw/branch/main/docker-restore.sh` -1. Make script executable `chmod +x docker-restore.sh` -1. Run the script `sudo ./docker-restore.sh /backups/.tar.gz` +You can use the restore command without an argument to use the last backup as +the archive to restore from. + +```bash +sudo docker-backup restore +``` + +Or if you'd like to restore using a specific archive then you can pass in +argument that contains the path to the backup archive to use. + +```bash +sudo docker-backup restore /backups/2025-04-21.tar.gz +```