0

I'm using Linux Mint 19 Tara with home folder encryption enabled. Now I want to configure home backups with backup tool, but I don't want to store backup inside home directory. I don't want to store it to external device neither (I want to have it locally and mirror it to my NAS server). I also want to have backup scheduled without need to enter password to authorize making backup, but of course I want my backup to be encrypted.

I don't know how can I create directory outside home, but inside my ssd, with permissions for backup tool to use it?

My current backup tool is default one installed with OS, it's called "Backup Tool" and in system monitor I see process name "mintbackup".

I just log in with my simple user account and press "Backup tool" without using 'sudo' so it's run as me.

So my problem is that I'm not able to point directory other than home (in backup tool, as backup destination directory), because I don't have permissions.

I just want to create some directory, for example /var/backups/home-backup/ and allow my user to touch it without sudo, so backup tool will be able to use it.

closed as too broad by Sparhawk, Romeo Ninov, Thomas, Haxiel, jimmij Mar 4 at 9:51

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    This is a pretty broad question. What is your current backup tool? What user does it run as? Are you saying that you want the backup on the same device? And is the backup unencrypted? What would the point of that be? i.e. having the home directory encrypted with an unencrypted copy floating around, and having a "backup" on the same directory, which doesn't protect against device failure. – Sparhawk Mar 3 at 7:58
  • To backup without password, then backup the encrypted files (not the decrypted files), this way you don't need a password, and you have not broken security. – ctrl-alt-delor Mar 3 at 9:58
  • A backup to the same device is not a backup. If you are trying to defend against user error, then use revision control: mercurial, sub-version, etc. – ctrl-alt-delor Mar 3 at 9:58
  • Backup to the same device is backup, because after creating backup mirroring tool is copying data to external device. Backuping encrypted files seems good approach, but it still left's me with my problem - I'm not able to point in backup tool directory other than home directory, because I don't have permissions. – tom Mar 3 at 10:02
1

I had different understanding of permissions, now I see that it's as simple as changing directory permissions or ownership to the directory, and I'm able to run backup tool with pointing given directory.

So I created directory /var/backups/home-backup as sudo, and than changed directory ownership of directory with sudo chown -R my_user_name /var/backups/home-backup and now I'm able to use this directory as backup destination catalog.

So I can also point this directory in NAS tool which copies data to external device and everything works as I wanted.

Sorry for asking this question, because of my small understating of Linux directories system I thought that I wont be able to easily access directories outside home from my simple user, without typing password each time.

0

To backup without password, then backup the encrypted files (not the decrypted files), this way you don't need a password, and you have not broken security.

A backup to the same device is not a backup. If you are trying to defend against user error, then use revision control: mercurial, sub-version, etc.

A normal user does not have permission to create a directory outside of their home. You will need to use sudo for this. You can create it owned as you, so that you can then use it. However there is no need:

  • You can put this directory into your home directory, and exclude it from backup
  • Backup to the same device is not a backup (but is poor mans revision control).
  • If you are using the local copy so that you can copy it to the external device, then you are doing it twice. Instead mount the external device (using sshfs), and do it once. You can mount the NAS into your home directory, and add it to the ignore list.
  • You don't need to ignore the NAS mount, because you can mount it alongside the decrypt mount. (do all operations outside of the decrypted environment.
  • Unfortunately I connect to NAS via third party service, so I'm not able to mount it locally, I have to use tool which synchronizes catalogs. – tom Mar 3 at 10:18

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