Skip to content

Commit

Permalink
tidy up readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dedekind561 committed Apr 18, 2024
1 parent 824b6ae commit 84f7737
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions guides/db-setup/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Local database setup ⚙️

## Initiating the Database
## Initialising the Database

### Create a local database

Expand Down Expand Up @@ -40,21 +40,17 @@ Now, let's create a compressed archive of your database for safekeeping. Use the
pg_dump -h localhost -U username videorec > videorec_backup.sql.gz
```

<details>
<summary>Explanation:</summary>
##### Explanation

- `pg_dump`: This command is designed specifically for creating PostgreSQL database backups.
- `-h localhost` (Optional): Specify the host (`localhost` in most cases) if your PostgreSQL installation differs.
- `-U username` (Optional): Include your username if required for connection.
- `videorec`: This is the name of the database you want to back up.
- `> videorec_backup.sql.gz`:\*\* This defines the filename and format for the backup. The `>` redirects the output to a file, and `.sql.gz` indicates a gzipped SQL archive.

</details>

**Verification:** Check your terminal or file explorer to confirm the existence of the backup file (`videorec_backup.sql.gz`).

<details>
<summary>Stretch: Customize Backup Location</summary>
#### Stretch: Customize Backup Location

- You can modify the output filename and location to suit your preference. For example:

Expand All @@ -63,7 +59,6 @@ pg_dump -h localhost -U username videorec > backups/videorec_backup_$(date +"%Y-
```

- This command incorporates the current date in the filename for easy identification and versioning.
</details>

### Removing, Re-initializing, and Restoring

Expand Down

0 comments on commit 84f7737

Please sign in to comment.