# How to change a restic password without losing your Rust backups

[Rust server guides](https://rustsc.com/learn/index.html.md) / [Backups and recovery](https://rustsc.com/learn/recovery/index.html.md)

Add the new way in, test it on existing backups, then retire the old password. The password that opens your backups and the credentials that reach their storage can expire separately.

## Identify which access is changing

This applies to a restic repository you run yourself. Access to the storage gets you to the repository. A repository password lets restic read the backups inside it. Write down which path or storage account and password entry your backup jobs use. Keep the recovery password somewhere you can reach if the Rust host goes down.

| Reason for the change | What to verify |
| --- | --- |
| Switching the storage account or credentials | With the new access, reach the intended repository and restore an existing snapshot. |
| Routine replacement of a repository password | Add a new repository key with its own password. From another device using only the new password, restore something from the history you want to keep. |
| Suspected exposure of the repository encryption key | Create a new repository with its own encryption keys. Verify required history and new backups there. A password change alone leaves the old encryption keys in use. |

## Make the next backup and read an old one

Suppose you created a repository password on the old host and now want one in your recovery vault. Add the new password through restic's key management. Check that you can recover a pre-update snapshot and its expected `.sav` from a separate device. Update your backup job and check that it makes a new snapshot you can read with the new access.

Keep a separate, verified copy of important recovery points before revoking anything. Once the old and new points both open using the new credentials, retire the old access and repeat the retrieval check. If you moved repositories because a key was exposed, limit access to the old repository and copies. A replacement key cannot protect a copy someone already obtained.

## Sources

- [Restic documentation on repository access and passwords](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html)
- [Restic reference on repository encryption and exposed keys](https://restic.readthedocs.io/en/stable/100_references.html)

## Related resources

- [Can you get to your Rust backups if the host is gone?](https://rustsc.com/learn/recovery/check-backup-access-with-host-unavailable/index.html.md)
- [What can you share from a Rust server backup when asking for help?](https://rustsc.com/learn/recovery/what-to-share-from-rust-backup/index.html.md)

---

HTML version: https://rustsc.com/learn/recovery/change-restic-backup-password-without-losing-history/
