Skip to content

Commit d7f773b

Browse files
backup settings
1 parent 7183a75 commit d7f773b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

hub/powertoys/hosts-file-editor.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ To filter host file entries, select the filter icon and enter data in either the
3535

3636
## Back up Hosts file
3737

38-
Hosts File Editor creates a backup of the hosts file before editing session. The backup files are located near the hosts file in `%SystemRoot%\System32\drivers\etc` named `hosts_PowerToysBackup_YYYYMMDDHHMMSS` and are deleted after 15 days.
38+
Hosts File Editor creates a backup of the hosts file before editing session. By default backup files are located near the hosts file in `%SystemRoot%\System32\drivers\etc` named `hosts_PowerToysBackup_YYYYMMDDHHMMSS`.
39+
Backups are deleted after 15 days, but the most recent 5 are always kept. This behavior can be configured in the PowerToys Settings.
3940

4041
## Settings
4142

@@ -47,6 +48,13 @@ From the Settings menu, the following options can be configured:
4748
| Show a warning at startup | Warns that editing hosts can change DNS names resolution. Enabled by default. |
4849
| Additional lines position | Default value is **Top**. If **Bottom** is selected, the file header is moved below hosts settings to the bottom. |
4950
| Consider loopback addresses as duplicates | Loopback addresses (like 127.0.0.1 and ::1) are considered as duplicates. |
51+
| Encoding | Choose the encoding used to save the hosts file between **UTF8** and **UTF8 with BOM**. |
52+
| Backups hosts file | If enabled, a backup of the hosts file is created when you save for the first time in a session. |
53+
| Location | Specify where backups are created. Default `%SystemRoot%\System32\drivers\etc`. |
54+
| Automatically delete backups | Choose **Never**, **Based on Count** or **Based on age and count**. |
55+
| Backup count | When **Automatically delete backups** is **Based on Count**, determine the number of backups to keep. Older backups will be deleted once the limit is reached. |
56+
| Days | When **Automatically delete backups** is **Based on age and count**, determine the number of days to keep backups. Older backups will be deleted once the limit is reached. An optional count of backups can be configured to always keep a fixed number of backups despite their age. |
57+
5058

5159
## Troubleshooting
5260

0 commit comments

Comments
 (0)