Backup Failed on Restore Points

Where does the restore/archive tasks log to? Have some issues with “backup failed”, and trying to dig into get to more pertinent troubleshooting information.

Predictably, found this right after.

What does the MineOS log report? /var/log/mineos.log

Continuing investigation. Or not, any better place to track this.

{“level”:“info”,“message”:"[ServerName] received request “backup”",“timestamp”:“2015-10-20T15:34:03.374Z”}
{“command”:“backup”,“uuid”:“fe087400-773f-11e5-93a8-9f30fab3bb2e”,“time_initiated”:1445355243328,“success”:false,“err”:1,“time_resolved”:1445355243530,“level”:“error”,“message”:"[ServerName] command “backup” errored out:",“timestamp”:“2015-10-20T15:34:03.531Z”}

Anyone got any pointers on this? I can’t get any backups at this point. Immediately returns “backup failed” with no real details.

Most likely cause is that somehow your backup destination has somehow created files mistakenly chowned to root, which sometimes happens when users do normal Minecraft tasks from the command line as root.

We can verify this quickly with the following commands:

cd /usr/games/backup/ServerName
ls -la

Then see if all the files listed are owned consistently by the same non-root user (mc on turnkey installations, and your normal username on all other installations). If they aren’t (e.g., root:root instead of mc:mc), you need to chown them.

You can also see what the backup looks like (and how it errors out) by initiating one manually:

rdiff-backup /usr/games/minecraft/servers/ServerName/ /usr/games/minecraft/backup/ServerName

The error that is lost in the logs will show up directly, here.

Don’t see anything in /usr/games/… was all in /var/games/minecraft/

The backup root directory is owned by root, but not anything below that.

drwxr-xr-x 3 root root 4096 Sep 18 03:58 archive
drwxr-xr-x 3 root root 4096 Sep 18 03:58 backup
drwxrwxrwx 2 root mc 4096 Aug 29 17:27 import
drwxr-xr-x 3 root root 4096 Aug 29 17:29 profiles
drwxr-xr-x 3 root root 4096 Sep 18 03:58 servers

mc@core minecraft/backup$ ls
Wilderun
mc@core minecraft/backup$ cd Wilderun
mc@core backup/Wilderun$ ls
FTBInfinityServer.zip InfinityPlus-20150919-041357.zip InfinityPlus-20151006-211225.zip banned-players.json eula.txt minetweaker.log server.config version.json
FTBInstall.bat InfinityPlus-20150919-041933.zip ServerStart.bat blueprints hats mods server.matt whitelist.json
FTBInstall.sh InfinityPlus-20150928-000631.zip ServerStart.sh config libraries ops.json server.properties
FTBServer-1.7.10-1448.jar InfinityPlus-20150929-001818.zip asm crash-reports logs rdiff-backup-data usercache.json
InfinityPlus InfinityPlus-20151002-140557.zip banned-ips.json cron.config minecraft_server.1.7.10.jar scripts usernamecache.json
mc@core backup/Wilderun$

Updating the command to the /var/games path and running manually.

rdiff-backup /var/games/minecraft/servers/Wilderun/ /var/games/minecraft/backup/Wilderun

Gives the following mess of errors.

Previous backup seems to have failed, regressing destination now.
Exception ‘’ raised of class ‘<type ‘exceptions.AssertionError’>’:
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 304, in error_check_Main
try: Main(arglist)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 324, in Main
take_action(rps)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 280, in take_action
elif action == “backup”: Backup(rps[0], rps[1])
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 337, in Backup
backup_final_init(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 501, in backup_final_init
checkdest_if_necessary(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 920, in checkdest_if_necessary
dest_rp.conn.regress.Regress(dest_rp)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/regress.py”, line 65, in Regress
assert mirror_rp.isdir() and inc_rpath.isdir()

Traceback (most recent call last):
File “/usr/bin/rdiff-backup”, line 30, in
rdiff_backup.Main.error_check_Main(sys.argv[1:])
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 304, in error_check_Main
try: Main(arglist)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 324, in Main
take_action(rps)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 280, in take_action
elif action == “backup”: Backup(rps[0], rps[1])
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 337, in Backup
backup_final_init(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 501, in backup_final_init
checkdest_if_necessary(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 920, in checkdest_if_necessary
dest_rp.conn.regress.Regress(dest_rp)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/regress.py”, line 65, in Regress
assert mirror_rp.isdir() and inc_rpath.isdir()
AssertionError

Both directories exist and are owned by mc user.

mc@core backup/Wilderun$ cd …
mc@core minecraft/backup$ ls -all
total 12
drwxr-xr-x 3 root root 4096 Sep 18 03:58 .
drwxr-xr-x 7 root root 4096 Aug 29 17:28 …
drwx------ 13 mc mc 4096 Oct 7 02:18 Wilderun
mc@core minecraft/backup$ cd …
mc@core games/minecraft$ cd servers
mc@core minecraft/servers$ ls -all
total 12
drwxr-xr-x 3 root root 4096 Sep 18 03:58 .
drwxr-xr-x 7 root root 4096 Aug 29 17:28 …
drwx------ 12 mc mc 4096 Oct 7 02:18 Wilderun

I did see some odd files in the server directory.

-rw------- 1 root root 158933794 Oct 7 02:18 rdiff-backup.tmp.720
-rw------- 1 root root 158933794 Oct 7 02:18 rdiff-backup.tmp.721
-rw------- 1 root root 158933794 Oct 7 02:18 rdiff-backup.tmp.722
-rw------- 1 root root 158933794 Oct 7 02:18 rdiff-backup.tmp.723
-rw------- 1 root root 158933794 Oct 7 02:18 rdiff-backup.tmp.726

I’m guessing this is the issue here, though I’m not sure how it came about. Less important is the ownership of the directories themselves and more important is the file ownerships (what rdiff-backup actually will get stopped on).

EDIT: Actually, can you tell me what commit you’re on? (in the top right of the webui). I think a more recent commit will make the following commands obsolete–as in, it’ll be done on your behalf automatically.

Try this as root:

cd /usr/games/minecraft 
chown -R mc:mc /var/games/minecraft/servers/*
chown -R mc:mc /var/games/minecraft/backup/*
chown -R mc:mc /var/games/minecraft/archive/*

This presumes that all your servers are mc;mc owned, but if that’s not the case, you’ll replace the * with the server name itself, e.g., Wilderun. root:root shouldn’t be the ownership on any files in /backup/, so it’s curious what happened on Oct 7 at 2:18.

1 Like

git commit 4c69bbf

Will it auto udpate, or do I need to force an update?

Did the chowns, everything owned by mc:mc now.

Still same error using that manual rdiff command above.

rdiff-backup /var/games/minecraft/servers/Wilderun/ /var/games/minecraft/backup/Wilderun

Previous backup seems to have failed, regressing destination now.
Exception ‘’ raised of class ‘<type ‘exceptions.AssertionError’>’:
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 304, in error_check_Main
try: Main(arglist)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 324, in Main
take_action(rps)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 280, in take_action
elif action == “backup”: Backup(rps[0], rps[1])
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 337, in Backup
backup_final_init(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 501, in backup_final_init
checkdest_if_necessary(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 920, in checkdest_if_necessary
dest_rp.conn.regress.Regress(dest_rp)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/regress.py”, line 65, in Regress
assert mirror_rp.isdir() and inc_rpath.isdir()

Traceback (most recent call last):
File “/usr/bin/rdiff-backup”, line 30, in
rdiff_backup.Main.error_check_Main(sys.argv[1:])
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 304, in error_check_Main
try: Main(arglist)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 324, in Main
take_action(rps)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 280, in take_action
elif action == “backup”: Backup(rps[0], rps[1])
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 337, in Backup
backup_final_init(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 501, in backup_final_init
checkdest_if_necessary(rpout)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py”, line 920, in checkdest_if_necessary
dest_rp.conn.regress.Regress(dest_rp)
File “/usr/lib/python2.7/dist-packages/rdiff_backup/regress.py”, line 65, in Regress
assert mirror_rp.isdir() and inc_rpath.isdir()
AssertionError

It will not autoupdate, and updating your git repo is preferable to doing the above work.

Just to be absolutely sure I do this the right way, its “git update”, and I do it as root right?

Oh and out of curiosity. I used the turnkey installation, is it weird that my stuff is in /var/games/minecraft instead of /usr/games/minecraft?

http://minecraft.codeemo.com/mineoswiki/index.php?title=Updating_the_Webui

Okay, I’m now on 59de176, did the npm install, then for good measure rebooted entire server.

Still getting that immediate “backup failed”. Manually running the rdiff-backup command is giving the same errors as above.

bump,. any idea what to do now?

Well, the issue you’re having is rdiff-backup related–not MineOS scripts–but I was hoping that a more recent commit actually could have fixed this issue (which we see now, not in your case).

Just as before, I guess MineOS is reporting just the vague error, but rdiff-backup seems to have that assertion error.

So a few questions. One, have you since run those chown commands? Two, are both of these paths all on the same partition? Three, I made a typo with /usr in the first place, it should have been /var.

Did run the chown, everything is owned by MC, and test rdiff is ran by the mc user. All are same partition.

Just a note, this did work until whatever occurred Oct 7th. No idea what that was. This is the turnkey install on a vmware server install running on a home server.

At this point I’d just recommend blowing away all the backups altogether. For reasons unknown, whatever exists in /var/games/minecraft/backup/Wilderun isn’t working as it should.

So let’s see what we can do to root this out.

  1. are there any scheduled tasks that are running for this server? (cronjob)
  2. rm -rf /var/games/minecraft/backup/Wilderun
  3. mkdir /var/games/minecraft/backup/Wilderun
  4. restart MineOS (the service or the host)

Hi.
Just to ask the simple and stupid question (since this actually happened to me;D ):

You say you run of a Virtual machine. Have you checked that there are enough free space on the disk inside the VM? I had the problem that all my archives and backups startet going 0-size. My disk actually grew so full that Minecraft couldn’t write the world to disc. First time this happened we lost a month of minecraft building.

This i also why I use CIFS and mount a windowsshare from my fileserver as backup and archive location. This however creates a new problem. You need to modify one of the .js files to get a filename windows allows( " : " (colon) is not allowed in a filename on windows partitions).

Scheduled Tasks - Just the normal system ones, I haven’t added any new ones.

2 +3 did the trick finally!!! Thanks so much for digging into this for me.

I had deleted those root owned tmp files previously as part of the troubleshooting, but guess maybe something else was in there.

@iMelsom Never a stupid question, we all learn as we go =). But alas, no, had tons of available space.

1 Like