I need to wipe my Raspberry Pi and I want to keep the same identity keys tied to my relay (I guess this is the Fingerprint, right?).

I think I understand that those keys are in the /var/lib/tor folder on Linux. Is that right?

Sadly, whether I use LXTerminal or the GUI, the access to such folder is denied.

I'm using Tor Could you please guide me backing up the files?

Thanks! :D

  • This is just a Linux permission error, your normal user won't have permissions to read them. You should be performing the action as root.
    – cacahuatl
    Feb 9, 2017 at 2:40
  • I tried using the sudo command but it didn't work... How do I log as root? Feb 9, 2017 at 14:28
  • Can you clarify what "it" is? This really is totally unrelated to Tor, this is normal Linux usage 101.
    – cacahuatl
    Feb 9, 2017 at 18:26

1 Answer 1


a fast-and-working way: open a terminal, state sudo -s and become a root, then run mc and go to the folder with your Tor install or with keys if you need just them in particular. Press F2 and "compress folder into tar.bz2" - you will have your full folder backup in a tarball one level higher =)

  • 1
    sudo -i is how you should use sudo to gain root, sudo -s is more dangerous since it executes the users SHELL environment variable as the command shell, which could be used to hijack the sudo command and escalate privileges. conversely, -i pulls it from passwd.
    – cacahuatl
    Feb 12, 2017 at 18:41
  • @canonizingironize in a possible-breakdown case I totally agree with you. But I think that the wipe is reasoned by the need of system rebuild - I have this need once a month or two when experimenting with a software.
    – Alexey Vesnin
    Feb 12, 2017 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.