0

I use backuppc to backup all my hosts onto a removable HDD, set up in my $TOPDIR property in backuppc's config.pl

/media/adam/Seagate-4TB/backuppc/

The HDD is connected up 100% of the time except when I'm changing it over.

The problem is that although the HDD is connected, it isn't mount at boot time. In fact the mount only occurs when I click on the drive in the GUI file manager or similar.

May 21 13:27:10 gondor backuppc[1332]: 2017-05-21 13:27:10 Can't create a test hardlink between a file in 
    /media/adam/Seagate-4TB/backuppc/pc and /media/adam/Seagate-4TB/backuppc/cpool.  
    Either these are different file systems, or this file system doesn't
    support hardlinks, or these directories don't exist, or there is a 
    permissions problem, or the file system is out of inodes or full. 
    Use df, df -i, and ls -ld to check each of these possibilities. 
    Quitting...
May 21 13:27:10 gondor systemd[1]: backuppc.service: Control process exited, code=exited status=1
May 21 13:27:10 gondor systemd[1]: Failed to start LSB: Launch backuppc server.
May 21 13:27:10 gondor systemd[1]: backuppc.service: Unit entered failed    state.
May 21 13:27:10 gondor systemd[1]: backuppc.service: Failed with result 'exit-code'.

This is all predictable, but I keep forgetting to mount the drive and restart the backuppc. Sometimes I leave it like that for weeks before it occurs to me that the backups aren't running :(

What are my options?

I was thinking of scripting a startup script to mount the removable drive before backuppc starts up, but is there a simpler option?

UPDATE

These are my harddrives, including the Seagate backup drive:

/dev/sdb1: UUID="f5e1afdc-69b4-4575-8fe4-d427dfc6874c" TYPE="ext4" PARTUUID="6e1a7899-01"
/dev/sdb5: UUID="b2fb1f65-b679-432f-9b0f-29ae8ef6aef0" TYPE="swap" PARTUUID="6e1a7899-05"
/dev/sda1: LABEL="Seagate-4TB" UUID="43d0ff42-f1f3-4101-ba50-1ddf68810440" TYPE="ext4" PARTLABEL="Seagate Backup Plus Drive" PARTUUID="522e4b98-09fa-40a9-8b21-4e204164f883"
/dev/sdd1: LABEL="WDPassport2T" UUID="cf125d89-87af-4dd1-9f17-8367c8e06bb1" TYPE="ext4" PARTUUID="83fb3c40-01"
/dev/sdc1: LABEL="Videos-2TB" UUID="28AA-C030" TYPE="exfat" PARTLABEL="primary" PARTUUID="d5261cee-ef5b-4039-bd63-e66334a47ea9"

1 Answer 1

1

The standard way to mount disks at startup is adding an entry in /etc/fstab.

  1. Make a folder to mount your disk with sudo mkdir /mnt/Seagate-4TB (or whatever name you want)
  2. Find the UUID of your disk by running sudo blkid The output will be something like:

/dev/sda2: UUID="32a4b76f-246e-486e-8495-31b8a781fb4c" TYPE="swap"

/dev/sda1: UUID="31f39d50-16fa-4248-b396-0cba7cd6eff2" TYPE="ext4"

Copy the UUID of the disk you want to mount

  1. Then edit /etc/fstab with sudo gedit /etc/fstab and add your entry to the end

UUID=31f39d50-16fa-4248-b396-0cba7cd6eff2 /mnt/Seagate-4TB ext4 rw,user,auto,nofail 0 0

Of course change the UUID to your actual disk UUID. You also may need to change the ext4 if you are using a different filesystem.

6
  • will this break the system if I detach the HDD
    – Adam
    May 21, 2017 at 14:45
  • If the HDD isn't present at boot it will result in an error. I edited my answer to include the nofail option, so nothing will happen if the drive is detached at boot.
    – Evan Chen
    May 21, 2017 at 14:52
  • that's sound. So it mounts my harddrive, but isn't there an option to make it use a generic mount point instead of a hard-coded one from me? I'm thinking of permissions, which have to include the backuppc user. I had a hard time getting the auto-mount to give it wide enough permissions - USB Drive auto-mounted by user but gets write permissions for root only
    – Adam
    May 21, 2017 at 15:08
  • The second column in /etc/fstab (which currently says /mnt/Seagate-4TB) can be changed to any mount point, you just have to make the folder first
    – Evan Chen
    May 21, 2017 at 15:14
  • Are you saying there are no default mount points if I don't give one? More critical though is whether the permissions will work by default for the backuppc user.
    – Adam
    May 21, 2017 at 15:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .