Skip to content

Commit 8181772

Browse files
authored
Improve README.md (#171)
1 parent 437f2e9 commit 8181772

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ docker run -u postgres:postgres -e POSTGRES_HOST=postgres -e POSTGRES_DB=dbname
2323
Docker Compose:
2424

2525
```yaml
26-
version: '2'
2726
services:
2827
postgres:
2928
image: postgres
@@ -105,7 +104,7 @@ Most variables are the same as in the [official postgres image](https://hub.dock
105104

106105
#### Special Environment Variables
107106

108-
This variables are not intended to be used for normal deployment operations:
107+
These variables are not intended to be used for normal deployment operations:
109108

110109
| env variable | description |
111110
|--|--|
@@ -116,16 +115,16 @@ This variables are not intended to be used for normal deployment operations:
116115

117116
First a new backup is created in the `last` folder with the full time.
118117

119-
Once this backup finish succefully then, it is hard linked (instead of coping to avoid use more space) to the rest of the folders (daily, weekly and monthly). This step replaces the old backups for that category storing always only the latest for each category (so the monthly backup for a month is always storing the latest for that month and not the first).
118+
Once this backup finishes successfully, it is hard linked (instead of copying to avoid using more space) to the rest of the folders (daily, weekly and monthly). This step replaces the old backups for that category storing always only the latest for each category (so the monthly backup for a month is always storing the latest for that month and not the first).
120119

121120
So the backup folder are structured as follows:
122121

123-
* `BACKUP_DIR/last/DB-YYYYMMDD-HHmmss.sql.gz`: all the backups are stored separatly in this folder.
122+
* `BACKUP_DIR/last/DB-YYYYMMDD-HHmmss.sql.gz`: all the backups are stored separately in this folder.
124123
* `BACKUP_DIR/daily/DB-YYYYMMDD.sql.gz`: always store (hard link) the **latest** backup of that day.
125124
* `BACKUP_DIR/weekly/DB-YYYYww.sql.gz`: always store (hard link) the **latest** backup of that week (the last day of the week will be Sunday as it uses ISO week numbers).
126125
* `BACKUP_DIR/monthly/DB-YYYYMM.sql.gz`: always store (hard link) the **latest** backup of that month (normally the ~31st).
127126

128-
And the following symlinks are also updated after each successfull backup for simlicity:
127+
And the following symlinks are also updated after each successful backup for simplicity:
129128

130129
```
131130
BACKUP_DIR/last/DB-latest.sql.gz -> BACKUP_DIR/last/DB-YYYYMMDD-HHmmss.sql.gz
@@ -134,13 +133,13 @@ BACKUP_DIR/weekly/DB-latest.sql.gz -> BACKUP_DIR/weekly/DB-YYYYww.sql.gz
134133
BACKUP_DIR/monthly/DB-latest.sql.gz -> BACKUP_DIR/monthly/DB-YYYYMM.sql.gz
135134
```
136135

137-
For **cleaning** the script removes the files for each category only if the new backup has been successfull.
136+
For **cleaning** the script removes the files for each category only if the new backup has been successful.
138137
To do so it is using the following independent variables:
139138

140-
* BACKUP_KEEP_MINS: will remove files from the `last` folder that are older than its value in minutes after a new successfull backup without affecting the rest of the backups (because they are hard links).
141-
* BACKUP_KEEP_DAYS: will remove files from the `daily` folder that are older than its value in days after a new successfull backup.
142-
* BACKUP_KEEP_WEEKS: will remove files from the `weekly` folder that are older than its value in weeks after a new successfull backup (remember that it starts counting from the end of each week not the beggining).
143-
* BACKUP_KEEP_MONTHS: will remove files from the `monthly` folder that are older than its value in months (of 31 days) after a new successfull backup (remember that it starts counting from the end of each month not the beggining).
139+
* BACKUP_KEEP_MINS: will remove files from the `last` folder that are older than its value in minutes after a new successful backup without affecting the rest of the backups (because they are hard links).
140+
* BACKUP_KEEP_DAYS: will remove files from the `daily` folder that are older than its value in days after a new successful backup.
141+
* BACKUP_KEEP_WEEKS: will remove files from the `weekly` folder that are older than its value in weeks after a new successful backup (remember that it starts counting from the end of each week not the beginning).
142+
* BACKUP_KEEP_MONTHS: will remove files from the `monthly` folder that are older than its value in months (of 31 days) after a new successful backup (remember that it starts counting from the end of each month not the beginning).
144143

145144
### Hooks
146145

0 commit comments

Comments
 (0)