Create new script to run this python script from anywhere, and a setup script to add it to path.

This commit is contained in:
Craig
2025-04-23 16:44:45 +01:00
parent a1ba360331
commit 3871c3fc8f
4 changed files with 55 additions and 3 deletions

View File

@@ -10,6 +10,26 @@ Simple-Backup provides:
- Pattern-based file exclusion
- Cross-platform compatibility on Linux systems
## Installation
You can install Simple-Backup system-wide to run it from anywhere:
```bash
# Clone the repository
git clone https://github.com/yourusername/simple-backup.git
cd simple-backup
# Run the setup script
./setup.sh
```
The setup script will either:
1. Create a symlink in `/usr/local/bin` if you have write permissions
2. Prompt you to run with sudo if needed
3. Offer to add the directory to your PATH in ~/.bashrc
After installation, you can run the `backup` command from any directory.
## Configuration
Create new backup jobs by adding JSON configuration files to the `configs/` directory. Each configuration file should include:
@@ -45,10 +65,10 @@ You can run backups manually or as a scheduled task:
### Manual Execution
```bash
# Make the script executable if needed
chmod +x backup.py
# Once installed, simply run:
backup
# Run the backup
# Or from the repository directory:
./backup.py
```