Skip to content

Commit

Permalink
removing redundancy in backup steps
Browse files Browse the repository at this point in the history
  • Loading branch information
vildead committed Oct 4, 2024
1 parent d9a8b85 commit bbfba8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
14 changes: 7 additions & 7 deletions doc/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,26 @@ docker compose exec backup sh /code/scripts/db.sh backup

To schedule the backup script to run automatically at a specific time using cron, add the following line to your crontab:

1. Open the crontab editor:
1. Ensure the destination location for backups in `.env` file (`BACKUP_VOLUME` variable)

2. Open the crontab editor:

```bash
crontab -e
```

2. Add the cron job entry (for example, to run the backup at 1 AM daily):
3. Add the cron job entry (for example, to run the backup at 1 AM daily) with path to the backup script:

```bash
0 1 * * * /path/to/backup_script.sh
0 1 * * * <path-to-project-root>/scripts/backup_script.sh
```

3. Check if the cron job is added:
4. Check if the cron job is added:

```bash
docker compose exec backup crontab -l
crontab -l
```

Replace `/path/to/backup_script.sh` with the actual path to backup_script.

## Restore Backup

Restore from a specific backup file:
Expand Down
20 changes: 1 addition & 19 deletions doc/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,9 @@ The application should now be accessible on `https://localhost/`

## Scheduled Backup with Cron

To schedule the backup script to run automatically at a specific time using cron, add the following line to your crontab:
To ensure the backups are properly set up, please refer to the [Backup manual](backup.md#Scheduled-Backup-with-Cron)

1. Ensure the destination location for backups in `.env` file (`BACKUP_VOLUME` variable)

2. Open the crontab editor:

```bash
crontab -e
```

3. Add the cron job entry (for example, to run the backup at 1 AM daily) with path to the backup script:

```bash
0 1 * * * <path-to-project-root>/scripts/backup_script.sh
```

4. Check if the cron job is added:

```bash
crontab -l
```

### Restore Legacy Backup

Expand Down

0 comments on commit bbfba8c

Please sign in to comment.