From 95da03cfd2239cc007ddeebadd6fb3d15f1df4dc Mon Sep 17 00:00:00 2001 From: hhf Date: Mon, 30 Sep 2024 09:14:16 +0530 Subject: [PATCH] Add README.md --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..946a9f7 --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# Proxmox Docker Volume Backup and Restore Script + +This script performs backup and restore operations for Docker volumes within Proxmox LXC containers. + +## Requirements + +- Ensure that `sshpass` is installed. For installation instructions, visit: [Cyberciti: SSH Password Provider](https://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/). +- Root login with a password must be enabled on the Proxmox host. Follow these steps: + 1. Edit the `/etc/ssh/sshd_config` file and apply the following configuration settings: + - `ListenAddress 0.0.0.0` + - `PasswordAuthentication yes` + - `PermitRootLogin yes` + 2. Restart the SSH service using the command: + ```bash + systemctl restart sshd + ``` + +## Usage + +To use the script for backup and restore operations, execute the following commands: + +- To backup a volume: + ```bash + ./proxmox.sh backup --host --user --lxc --volume --path + ``` + +- To restore a volume: + ```bash + ./proxmox.sh restore --host --user --lxc --volume --path + ``` + +### Parameters + +- `host`: Proxmox host IP address or hostname +- `user`: Proxmox host username +- `lxc`: LXC container number +- `volume`: Name of the Docker volume +- `path`: Path for the backup location + +## Examples + +- To backup a volume: + ```bash + ./proxmox.sh backup --host 192.168.0.100 --user root --lxc 100 --volume searxng_data --path /Users/hhf/backup + ``` + > The backup file will be saved to `/Users/hhf/backup/hhf_data-backup.tar.gz`. + +- To restore a volume: + ```bash + ./proxmox.sh restore --host 192.168.0.100 --user root --lxc 100 --volume searxng_data --path /Users/hhf/backup + ``` + > The backup file will be restored from `/Users/hhf/backup/searxng_data-backup.tar.gz`, so please ensure that the file exists. This action will overwrite existing files within the Docker volume. + +## Disclaimer + +This script is intended for experienced users. Ensure that you understand the implications of backing up and restoring Docker volumes in your environment before using this script. \ No newline at end of file