feat: README updates to reflect single script usage.
This commit is contained in:
21
README.md
21
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. Copies the result to the `/backups` folder.
|
||||||
1. Cleans up / removes temporary directory that was created.
|
1. Cleans up / removes temporary directory that was created.
|
||||||
1. Restarts all the services.
|
1. Restarts all the services.
|
||||||
|
1. Removes backups older than 7 days.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ stored in. This is done by editing the `/etc/fstab` file, and adding the
|
|||||||
following line.
|
following line.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
//<nas_ip>/docker/backups/<machine> /backups cifs credentials=/home/michael/smbcredentials,uid=0,gid=0 0 0
|
//<nas_ip>/docker/backups/<machine> /backups cifs credentials=/path/to/smbcredentials,uid=0,gid=0 0 0
|
||||||
```
|
```
|
||||||
|
|
||||||
Once that is done:
|
Once that is done:
|
||||||
@@ -66,11 +67,21 @@ sudo systemctl start backup.service
|
|||||||
|
|
||||||
## Restore
|
## 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!).
|
volumes from a backup (hopefully it's never needed!).
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
1. Download the script `wget https://git.housh.dev/homelab/backup/raw/branch/main/docker-restore.sh`
|
You can use the restore command without an argument to use the last backup as
|
||||||
1. Make script executable `chmod +x docker-restore.sh`
|
the archive to restore from.
|
||||||
1. Run the script `sudo ./docker-restore.sh /backups/<backup>.tar.gz`
|
|
||||||
|
```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
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user