Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

NEMS 1.3 - Getting 404 for NEMS Backup URL

#1
Hey Robbie,

As I was reading through the documentation, I saw that you have a way of making the backups convenient with snapshots over URL. I was reading the documentation here:

https://docs.nemslinux.com/tips/backup_n...omatically

According to the documentation, it says to use this URL: https://NEMSIP/backup/backup.nems

I tried the URL and I get a 404 like this:

Not Found

The requested URL /backup/backup.nems was not found on this server.

NEMS Linux Server at nems.local Port 443

Now what's interesting is that I can confirm that the URL is actually creating the snapshot if I access over Samba. The backup.nems file is there over the Samba path.  I can tell by the modified date. And what's more interesting is that according to the documentation, if I access over Samba, it should create a new backup snapshot. But no matter how much I try, the snapshot only updates over the URL (although it keeps giving the 404 not found error.) I can also say that I see the backup being created at /var/www/html/backup/snapshot/backup.nems

To me, it's more of a big deal for wget not working as I want to use wget for pulling the backup.nems. It sounds like there are two potential issues here 1) Can't access backup over URL 2) Snapshot not being created over Samba.

Please let me know if you need anything else from me.

Edit: I got some more findings here. If I try to access https://mynemsip/backup/snapshot/backup.nems, I get the backup file just fine. However, a new backup is not generated unless I access over https://mynemsip/backup/backup.nems. So in other words, I have to access https://mynemsip/backup/backup.nems (get 404 error) and then https://mynemsip/backup/snapshot/backup.nems to pull the backup. I'm thinking that is not the intended design.
#2
Sorry you're having trouble.

First of all, for those perusing the thread for help, it should be noted that it is clear to me that panda2297 understands that NEMSIP and mynemsip are to actually be replaced with the IP address of your NEMS server... or these days using nems.local works in most cases as well.

panda2297, let's dig in...

NOTHING you do initiates the backup refreshing. I think you're getting confused when downloading it, and then a moment later downloading it again and seeing it hasn't changed. Then, you click a 404 link and suddenly it's a new file so you think there is a connection. Good deductive reasoning, but alas, pay no attention to the man behind the curtain! The backup automatically generates on a schedule... every 5 minutes. So you're simply noticing the file doesn't change with every load, but then after 5 minutes, boom, it's a new file.

So let's look at the real problem here. 404.

The correct URL is https://nems.local/backup/backup.nems

If accessing it in a browser, it'll ask you for your NEMS username and password, which you must enter.

Upon entering it correctly, it'll redirect and give you the file download. Is this not what you are experiencing?

The wget command I provide on the page you linked to should work flawlessly, assuming you enter the correct NEMS username and password in the needed fields.

Let me know. The output of your terminal when running the wget command might help too (just *** out your password).

Cheers,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#3
Robbie,

Yes that's correct. As soon as I run to the URL, I get a 404 (after I log in - sorry I should mention that.) Wget fails as well. I think it might be a good idea to do another screencast to show you exactly what I am seeing. In regards to the refreshing behavior, it's definitely updating the modified date. At least what I am seeing. I will post a screencast soon to show you what I see.
#4
Can't wait for the show  Smile
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#5
Here is the video: https://youtu.be/criHn4pMD0I.  I'm pretty sure at least just accessing the URL and getting the file is more of a documentation update. You might have to give it about 15 minutes to process. In regards to the permission denied error at the end, I had to use sudo to get permission. But when I did that, I got a 401 unauthorized error and this confirming my password is correct

WARNING: cannot verify nems.local's certificate, issued by '/CN=NEMS':
  Self-signed certificate encountered.
WARNING: no certificate subject alternative name matches
requested host name 'nems.local'.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to [nems.local]:443.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.
#6
Ohmigosh - I from quickly skimming the video (I'll watch it thoroughly tonight) it appears I forgot to update documentation when I moved backup.nems off the SD card!!! You're not crazy--I am!

I'll get a good look at it tonight and fix it for you...

Thanks!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#7
Hey Robbie,

Was just wondering if you found anything. I'm unable to use wget to pull the backup successfully with my pi backup server.
#8
Hi panda2297 - sorry, I actually got caught up between Easter festivities and having 2 sick kids and a sick wife at home (came down with a debilitating cold).

I'll get back on track this week and issue a patch. Thanks for checking in!!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#9
Fixed! Thanks again for pointing this out.

Now, in your wget command, you're showing an error "/backup/backup.nems - No such file or directory". Remember, the -O command in wget is saying OUTPUT to this folder. But /backup doesn't exist on your system. You need to change -O /backup/backup.nems to /wherever/you/want/it/backup.nems. Sorry that's not clear. I've improved the documentation and I appreciate your feedback (it helps me read things the way an end-user reads them). The reason you're getting the "permission denied" is not your NEMS server, but your Mac. Your Mac is saying "You're not allowed to save to /backup.nems" and "/backup/backup.nems doesn't exist"...
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 
 
Forum Jump:

Users browsing this thread: 1 Guest(s)