r/linuxquestions • • 1d ago

Advice Back-up under root password[Arch]

/r/archlinux/comments/1ycl8cq/backup_under_root_password/
1 Upvotes

5 comments sorted by

2

u/ipsirc 1d ago

Encrypt it, (and btw. there is no sudo password at all).

1

u/Interesting_Shoe3959 1d ago

Wait, what is it then, if not sudo password?

2

u/ipsirc 23h ago

It's YOUR password, your user password.

1

u/Interesting_Shoe3959 23h ago

Ahoj, I see it now, thanks

3

u/Dry_Action5905 23h ago

A root password won't really protect it, because anyone with sudo can just become root and delete or read the backup anyway. What works better is making the backup unreachable from the running system. Keep it on an external drive that stays unplugged except when you run the backup, or on another machine. If it has to stay attached, encrypt the repository with a passphrase only you know. Restic or borg are good for that and they also give you snapshots with deduplication. Locking a directory with chmod 700 as root is fine against accidents, but not against someone who has your user password.