Create a repository
Create an encrypted repository in a local directory.
Before you begin
- Install restic.
- Choose a strong password and store it in a password manager. You cannot recover data without it.
Steps
-
Run the initialization command. The command creates the directory if it does not exist:
bash restic init --repo /tmp/restic-demo-repo -
Enter a password when restic prompts you, and enter it again to confirm.
Restic prints
created restic repository, followed by a repository ID and the path you chose. It also warns that losing your password means losing your data. -
List the repository directory to confirm that restic created its files:
bash ls /tmp/restic-demo-repoThe directory contains a
configfile and the subdirectoriesdata,index,keys,locksandsnapshots.
Next steps
Continue with Back up files.