Mount NFS share for archive/backup

Setup a turnkey installation in a VM on ESXi & on the linux learning curve (way down at the bottom, honestly.)

I wanted to get the backups out of the VM and onto my NAS. Installed NFS client, setup mounts in /etc/fstab but they won’t mount on reboot. mount -a links them up fine.

Also, once they’re mounted the web UI can’t seem to access them. No backups/archives are listed and the button generates an error with no clear clue in the mineos.log file. Doesn’t seem to be a permissions issue. Google hasn’t yielded much so far.

I do the same thing, only with samba and a windows share. I also had problems with the archives failing. For me it was a naming issue.

in /usr/games/minecraft you have a file named mineos.js

in line 929 you will find where Mineos builds the filename:

var filename = 'server-{0}_{1}.tgz'.format(self.server_name, strftime('%Y-%m-%d_%H:%M:%S'));

It might be that your nfs-share do not accept ‘:’ (colon) as a character in a filename, edit this file so that the filenames do not use colons:

for example:

var filename = 'server-{0}_{1}.tgz'.format(self.server_name, strftime('%Y-%m-%d_%H-%M-%S'));

Then again, NAS’es usually use some sort of *nix OS for their NFS shares, and *nix have no problems with ‘:’ (colon) as a filename character.

2 Likes

No dice on that one. Any log files I can dig into? mineos.log only gives me a line like:

> {"level":"info","message":"[HG] x.x.x.x issued command : \"backup\"","timestamp":"2016-02-09T20:47:12.826Z"}
> {"level":"info","message":"[HG] received request \"backup\"","timestamp":"2016-02-09T20:47:12.827Z"}
> {"command":"backup","uuid":"x","time_initiated":1455050832827,"success":false,"err":1,"time_resolved":1455050832906,"level":"error","message":"[HG] command \"backup\" errored out:","timestamp":"2016-02-09T20:47:12.906Z"}

Hi again.

As I said, NFS mounts to NAS usually should not be affected by the naming issue, I use SAMBA to mount a windows share.
Since I do not have any NFS-NAS available, I havent really looked into NFS mounting to much.

I do expect a rights issue. Please check how the NFS share is mounted to your MineOS server. Chek that it connects to a share that is not read only, and that the MineOS user has write rights to it. Easiest way: Go to where you mounted you NAS NFS, and try to create a file while logged into MineOS with SSH. If you can create and save a file there, you have write access, and MineOS should also have for Archiving and Backups. If you cannot, you lack the rights to write, and cant create files.

Wow, yep. It’s a rights problem. I ran ls -l and saw all the letters filled in and thought I was good.

The mounts are rw, but I’ve got something goofed up. I’ll read up that direction, thanks!

lrwxrwxrwx 1 root root   13 Feb  5 23:25 archive -> /mnt/archive/
lrwxrwxrwx 1 root root   12 Feb  5 23:26 backup -> /mnt/backup/
drwxrwxrwx 2 root mc   4096 Jan 31 14:51 import
drwxrwxr-x 5 root root 4096 Jan 31 17:25 profiles
drwxrwxrwx 8 root root 4096 Feb  2 01:36 servers

I had the mounts directly in /var/games/minecraft but moved them elsewhere and tried symlinks from there for troubleshooting.