What's new

BACKUPMON BACKUPMON v1.5.10 -Mar 1, 2024- Backup/Restore your Router: JFFS + NVRAM + External USB Drive! (**Thread closed due to age**)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I have thought about this label issue for a while. There are numerous times a user doesn’t label a drive - and it can cause many issues later on.

I know this might sound draconian, but @thelonelycoder and @ColinTaylor, should we force the user to enter a label during amtm’s format operation? If someone is technical enough to go into amtm and format a drive, I would think they would not mind entering a label for the drive.
Personally, I would not make it an ”option” in the amtm fd function.

Just my $0.02.
That sounds reasonable for amtm's fd option. The user could enter their preferred label or hit enter for a default label (e.g. "amtm"). Of course that doesn't necessarily help this backup script as the user may not have used amtm to format their disk, or used an older version that didn't enforce a label. So this script would still have to allow for that.

Once you go down this rabbit hole how far do you go. The user might have multiple partitions and multiple USB disks and give (or default) all the filesystems the same label. So you could end up with 8 filesystems all labelled "amtm", whereas without labels they'd be called sda1, sda2, sda3, sda4, sdb1, sdb2, sdb3 and sdb4 - in a random order.

This is probably a discussion best had in an amtm thread.
 
That sounds reasonable for amtm's fd option. The user could enter their preferred label or hit enter for a default label (e.g. "amtm"). Of course that doesn't necessarily help this backup script as the user may not have used amtm to format their disk, or used an older version that didn't enforce a label. So this script would still have to allow for that.

Once you go down this rabbit hole how far do you go. The user might have multiple partitions and multiple USB disks and give (or default) all the filesystems the same label. So you could end up with 8 filesystems all labelled "amtm", whereas without labels they'd be called sda1, sda2, sda3, sda4, sdb1, sdb2, sdb3 and sdb4 - in a random order.

This is probably a discussion best had in an amtm thread.
Yes, it could become a bit of a rabbit hole in mult-disk/paritition situations.
One idea (i’m sure there are others) for someone that doesn’t want to actually come up with a unique label - get the UUID and do some kind of version of that.
In any case, most anything is better than sda1,sdb3, etc.

Good idea to move to the amtm thread.
 
I connected an SSD to the router on which amtm and all the other addons run. Can I save the bkp above there?
You would typically want to save this backup on another device, other than your SSD. This device or it's contents could go bad, which is the reason for backing it up. If you have a PC, laptop or NAS that's always on, it's simple to set up a share to which you can push backups to.
 
That sounds reasonable for amtm's fd option. The user could enter their preferred label or hit enter for a default label (e.g. "amtm"). Of course that doesn't necessarily help this backup script as the user may not have used amtm to format their disk, or used an older version that didn't enforce a label. So this script would still have to allow for that.

Once you go down this rabbit hole how far do you go. The user might have multiple partitions and multiple USB disks and give (or default) all the filesystems the same label. So you could end up with 8 filesystems all labelled "amtm", whereas without labels they'd be called sda1, sda2, sda3, sda4, sdb1, sdb2, sdb3 and sdb4 - in a random order.

This is probably a discussion best had in an amtm thread.
Maybe instead of a default "AMTM" if they don't enter something, make it more unique like "AMTM-SDA2". I completely agree that labels should have some kind of value in them. In this particular script, this label helps name the backup files, so you have some semblance of where it came from, and is used to push back to the drive during a restore, to ensure it's ending up in the same place it came from.

No disrespect to anyone, but when a program asks for a field to be filled out, it's just bad practice in general to leave things blank.
 
You would typically want to save this backup on another device, other than your SSD. This device or it's contents could go bad, which is the reason for backing it up. If you have a PC, laptop or NAS that's always on, it's simple to set up a share to which you can push backups to.
I don't have a Nas always on, so I can't use this addon
 
I don't have a Nas always on, so I can't use this addon
Why not? There is no absolute requirement to use scheduling, therefore I am simply backing up (manually, on demand) to a Windows shared folder. Sure, it would be nice to have this happen automatically on a schedule, but I have neither a NAS or PC running all the time.
 
Why not? There is no absolute requirement to use scheduling, therefore I am simply backing up (manually, on demand) to a Windows shared folder. Sure, it would be nice to have this happen automatically on a schedule, but I have neither a NAS or PC running all the time.
I would like to do the BKP directly on the SSD connected to the router where amtm and all the addons are running
 
I would like to do the BKP directly on the SSD connected to the router where amtm and all the addons are running
Are you talking about a second SSD?
 
I would like to do the BKP directly on the SSD connected to the router where amtm and all the addons are running
That's like saying, I'm going to back up all my precious family photos that are on my mobile phone, to my mobile phone! That is definitely not recommended. As @jsbeddow mentioned, just periodically back up your router to your laptop or PC. You can set up a very simple share to back up your router with very little effort.
 
That's like saying, I'm going to back up all my precious family photos that are on my mobile phone, to my mobile phone!
Not at all. For a very long time I did exactly this (even now I do a variation of this). Not everybody wants to backup their entire USB drive. I'd suggest that just like the original nsrum most people only really care about backing up their settings and jffs partition, just like can be done in the GUI. Doing that to a local USB drive would be the obvious choice as it's not dependant on the availability of an external device.

So the mobile phone analogy would be to create copies of the pictures stored on the phone's internal memory on an SD card. If the phone dies you take the card out and put it in your new phone.
 
Last edited:
Not at all. For a very long time I did exactly this (even now I do a variation of this). Not everybody wants to backup their entire USB drive. I'd suggest that just like the original nsrum most people only really care about backing up their settings and jffs partition, just like can be done in the GUI. Doing that to a local USB drive would be the obvious choice as it's not dependant on the availability of an external device.

So the mobile phone analogy would be to create copies of the pictures stored on the phone's internal memory on an SD card. If the phone dies you take the card out and put it in your new phone.
I respectfully disagree. In fact, most modern phones nowadays (except for maybe Samsungs) no longer have any SD card capabilities. So when your phone dies, all your data that was on that phone dies along with it. My SSD also does not have an SD card that I can just plug into my next SSD should it happen to die. When a flashdrive or SSD dies, it takes everything with it in one fell swoop.

What you're describing here is "putting all your eggs in one basket". It's certainly not what I would recommend. If you have absolutely no other place to put it, maybe. But even when downloading a copy of your CFG or JFFS partition using the GUI, you're downloading these to a PC/laptop, ie. another device other than your router or attached drive.

I think my analogy stands... backing up your router to an attached SSD is like backing up your phone to your phone. In the case of what this script does, it's like backing up your phone to a cloud service... and it's specifically geared to make a network connection to an external device to do just that.

I still stand firm that you would want to store backup copies of the device you're trying to backup, far away from the actual device. If your router + SSD fries in a freak lightning storm, you would at least have a way to get back to where you left off after having replaced your equipment.
 
I'm not disagreeing with you and that backing up data to a remote device or location is the best policy. I'm just saying that it's not the only solution and may not be appropriate for some situations. We've seen different solutions in the past like nsrum or mirroring one USB drive to another using rsync. What about NFS, FTP, scp, dropbox, etc? How many times have we seen people attach 4TB drives to their routers and fill it with their media collection. What's the point of repeatedly backing up the entire USB drive in that case.

To be clear I'm not criticising this project in any way. I'm just saying that there is no "one size fits all" solution when it comes to backup strategies (I did this as my day job for over 30 years ;)).

As an aside, IMHO there should be nothing contained on the router's local USB drive that you aren't prepared to loose. Personally, I regard any router backup solution as a time saving convenience rather than a necessity. No precious family photos on the USB drive please.
 
Last edited:
It depends on what use you make of the bkp. I run a BKP not thinking that the SSD will break but to use it in case of new firmware, to have a clean installation
 
It depends on what use you make of the bkp. I run a BKP not thinking that the SSD will break but to use it in case of new firmware, to have a clean installation
Just so you know, it's not meant to restore to a new firmware. The CFG may have differences and cause corruption or instability if you did restore it. It's only meant to restore back to the same firmware version. I'm planning on including some of that info in the instructions.txt so you know what firmware level the backup was taken from... and will throw up a big warning if it notices that it's restoring to a newer firmware level.
 
Last edited:
I split my SSD partition in 2 because of the size but i've yet to use the NTFS formatted side of it. I have minimal scripts running on the 1st partition but It would be nice to have the option to backup to the 2nd partition as an option but if it will create more issues than it's OK too. I did labeled both partitions as well and I understand I run a risk if my ssd becomes corrupt but thats on me.

On another note...thanks for the script as it's working flawlessly!
 
Last edited:
So when your phone dies, all your data that was on that phone dies along with it.

No. Settings and App data to the account in the cloud, Pictures uploaded to the default cloud storage or somewhere else. I can smash my iPhone with a hammer now and get everything back in 1h time on a new iPhone. About the same with Android phones. If you know what are you doing you lose nothing or very little and recoverable. I have both iOS and Android devices in use, for some data they share the same cloud services. I can actually smash the iPhone and restore most of my user data to an Android device.
 
No. Settings and App data to the account in the cloud, Pictures uploaded to the default cloud storage or somewhere else. I can smash my iPhone with a hammer now and get everything back in 1h time on a new iPhone. About the same with Android phones. If you know what are you doing you lose nothing or very little and recoverable. I have both iOS and Android devices in use, for some data they share the same cloud services. I can actually smash the iPhone and restore most of my user data to an Android device.
I'm saying you would lose everything if you didn't have any cloud backup options. ;)
 
I am trying this for the first time and before I run a backup, I am testing the configuration, but it is failing for me.

Here is the configuration:

----------------------------------------------------------------
Backup Target Network Connection Tester
----------------------------------------------------------------
1 : Test Target Username : admin
2 : Test Target Password : (hidden)
3 : Test Target UNC Path : \\\\10.0.100.90\\Backups
4 : Test Local Drive Mount Path : /tmp/mnt/primary
5 : Test Target Dir Path : /router/test-backup

I created a directory called /tmp/mnt/primary before I ran the test. When I run it, it fails with the following errors:

Messages:
INFO: External Drive directory exists. Test directory found under: /tmp/mnt/primary
mount: mounting \\10.0.100.90\Backups on /tmp/mnt/primary failed: Connection refused
WARNING: Unable to mount to external drive. Retrying...
mount: mounting \\10.0.100.90\Backups on /tmp/mnt/primary failed: Connection refused
WARNING: Unable to mount to external drive. Retrying...
ERROR: Unable to mount to external drive (/tmp/mnt/primary). Please check your configuration. Exiting.
ERROR: Failed to run Network Connect Test Script -- Drive mount failed. Please check your configuration!

I am sure I probably misconfigured something somewhere. Any ideas what could be causing the test to fail?

Thanks in advance.
 
I am trying this for the first time and before I run a backup, I am testing the configuration, but it is failing for me.

Here is the configuration:

----------------------------------------------------------------
Backup Target Network Connection Tester
----------------------------------------------------------------
1 : Test Target Username : admin
2 : Test Target Password : (hidden)
3 : Test Target UNC Path : \\\\10.0.100.90\\Backups
4 : Test Local Drive Mount Path : /tmp/mnt/primary
5 : Test Target Dir Path : /router/test-backup

I created a directory called /tmp/mnt/primary before I ran the test. When I run it, it fails with the following errors:

Messages:
INFO: External Drive directory exists. Test directory found under: /tmp/mnt/primary
mount: mounting \\10.0.100.90\Backups on /tmp/mnt/primary failed: Connection refused
WARNING: Unable to mount to external drive. Retrying...
mount: mounting \\10.0.100.90\Backups on /tmp/mnt/primary failed: Connection refused
WARNING: Unable to mount to external drive. Retrying...
ERROR: Unable to mount to external drive (/tmp/mnt/primary). Please check your configuration. Exiting.
ERROR: Failed to run Network Connect Test Script -- Drive mount failed. Please check your configuration!

I am sure I probably misconfigured something somewhere. Any ideas what could be causing the test to fail?

Thanks in advance.
I would try making sure that your 10.0.100.90 device is correctly configured. Seems that it's refusing your connection from the router. Could be network share permission issues? Could be username/pwd issues? What kind of device is .90?

PS. I'm so glad I built this tester functionality in... this is exactly what it's useful for! :)
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top