I installed a second HD, and formatted it to ext4. I gave it the “/backup” label. I am trying to figure out how to mount it so that I can run cron to backup my home folder onto it once a week.
And what exactly is the problem? I don’t see anything unusual in your fstab for the new disk. The only thing I can recommend is add to all ext4 partitions the ‘noatime’ option which can, in specific cases, increase performance by up to 30%
Should have looked at the table closer. Your new drive should be mounted as /backup in the root directory. As root user type mount -a or just reboot to see it.
The actual folder /backup must exist in /
It’s confusing you say label, to me when you are taking partitioning I think of the HD’s ID or Volume Label
/backup in fstab is a mount point
Mount the partition to /backup
open a console and change its permissions; chown yourusername:users /backup
when you unmount it, the /backup directory will get root:root permissions
when you mount it again, the /backup directory will have your username & group permissions
First to make it clearl @Heeter: do not start changing anything when you are satisfied with what you are doing only because what I am grumbling about.
Why do you mount a disk that you do NOT want to use for the system, but for the end-user in /backup. I would mount it in /home/heeter/backup (and of course the owner:group of that directory will be heeter:users as all the other files/directories there). It is apparently for user heeter to back up things to and not for a system backup (where root is responsible).
Note that there’s a difference between the ‘user’ option and the ‘users’ one. If you want to be able to always mount/unmount that partition at any time, you should use ‘users’ instead. The reason for this is that if you use ‘user’ and you reboot, the partition will be mounted again as the root user and the ‘user’ option only allows those who mounted the partition to unmount it again. Since root is used to mount during boot, only root will be able to unmount it again and if you need to unmount it after boot for whatever reasons with your normal user, you will fail and you’ll need to login as root to unmount it
If you use ‘users’ instead of ‘user’, any user can mount/unmount the partition so it doesn’t matter who mounted it. If root user mounts it and ‘users’ is present in fstab, you as normal user will be able to unmount it, in contrast to when only ‘user’ is present in fstab which will not allow you to unmount it as normal user since root has mounted it
Also, personally, I dislike polluting the / root tree with non-standard directories. If I was you, I’ll use /media, which is also the main directory used to mount portable devices, so I’ll create a backup dir in /media and change the /backup in fstab to /media/backup. But this is just me, you do as you please…
That depends on what/how you backup. I do not know what backup software you use, nor if you backup everything in /home (often people back up just their documents, music. movies), etc. It must be easy to tell your backup software to backup everything to /home/heeter/backup except /home/heeter/backup.
My post was because in general I see a total lack of background knowledge about the fact that in the Unix/Linux file hierarchy you can mount where needed. To me it seems that a lot of people are infected by some MS virus and do not understand the message that a partition does not have to be at the uppermost level (directly below /) like the (still worse) MS way of having it even as a new hierarchy.
But when you are aware of these facts and choose to mount on /backup, I am not telling you to do otherwise. It is your deecision after looking at the Pro and Con arguments. And that is as it should be, not doing what other stupids did or told you, but thinking about it and comming to a conclusion.
BTW, when you choose for the solution to mount this “user disk space” on a “system place” you should have thought about the fact that then the user must be the owner of this place The fact that you didn’t let me think that you did not realy understand the freedom the Unix/Linux way of mounting offers you and that let me make my post.