About restoring backup in a newly installed OS

Hi,

First of all, apologies for this kind of “dumb” question.

But happens that I am new to restic, and would like to clarify some points in order to better use it and implement correct backup policies.

Guys, my question is: I am running backups with restic. Everything is well.

Supposing I need to reinstall my OS (Linux) in the future. The steps I need to follow in order to restore one of my snapshots stored on disc are:

  1. Install restic and have the drive with the backups available and plugged in;
  2. Start the repo (restic init --repo /path/to/repo);

Obs: at this point restic will correctly identify that I am initializing a existing repo, with data on it?

  1. Restore the backup, through mount or restore.

Is the above sequence correct?

Thanks once again for your help.

Nope. You only need restic init to initialise new repo. You do not to have to init it again and again. No idea what will happen - maybe restic just wipes it out. You can try on some test repo to find out if curious:)

In your case what you will need is for example:

restic -r /path/to/repo restore 12345678 --target /path/to/restore/location

Thank you.

That’s perfect! Just one command, more simpler. I thought I would need to init the repo again in a new installed OS, for example.

restic will abort if you try to init a directory that’s already a restic repo (specifically, a directory with a config file inside it).

This is at least your 3rd post today about very basic restic usage. Perhaps you would benefit from reading the restic docs which are clear, concise and answer your Qs about basic usage. It’s a bit more work on your part vs asking other posters, but you will gain a much more thorough understanding of the basics if you do this.

This is at least your 3rd post today about very basic restic usage. Perhaps you would benefit from >reading the restic docs which are clear, concise and answer >your Qs about basic usage. It’s a bit more work on your part vs asking other posters, but you will gain a >much more thorough understanding of the basics if you do this.

Well, I read the docs, and in fact, I am reading them a lot.

I just did not found any mention to this question there, about initializing a new repo, what would or would not happen in that case, etc.

And not, you’re wrong. This was my first topic today, and I did not know I needed to ask for permission for asking things.

Sorry if I bothered you.