Backup/Restore hosts file

Backup your hosts file

You can save a copy of your hosts file with this command:

Command:

hostctl backup --path $HOME/hostctl/

It will create a file $HOME/hostctl/hosts.20200314 with the full content of your hosts file.

Restore a hosts file

You can restore a previous backup of your hosts file with this command:

Command:

hostctl restore --from $HOME/hostctl/hosts.20200314

This action will overwrite your hosts file with the content of your backup. It cannot be undone.

Last updated by guumaster on July 20, 2020 at 20:50 +0200