What's new
  • 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!

BACKUPMON BACKUPMON v1.8.22 -Nov 28, 2024- Backup/Restore your Router: JFFS + NVRAM + External USB Drive! CIFS/SMB/NFS! (Now available in AMTM!)

Is there an easy way to completely disable backups for an external USB storage? It seems that it currently requires adding every folder to exceptions, which is not very convenient. Would it be possible to implement a toggle for that? I don't need to back up my external drive because it's mostly used as temporary storage for files that get periodically uploaded to AWS, and they are pretty big.
Did you try adding the following (substitute DRIVE with external USB label) to the exclusions file? (I haven't tried — just thinking out loud):

/tmp/mnt/DRIVE/*
 
Yes, it works, but it would be really nice if there were a toggle for this so I don't need to exclude every folder in the storage. Seems like an idea for a small feature request 🙂

Yeah after reading it a second time I realized you were essentially asking for a feature to always exclude any USB device. @Viktor Jaep might have a reason he doesn't provide that feature. I'm not 100 % sure.

Did you try adding the following (substitute DRIVE with external USB label) to the exclusions file? (I haven't tried — just thinking out loud):

/tmp/mnt/[B]DRIVE[/B]/*

I haven't reviewed the code for backupmon in a while, but my concern would be since backupmon uses the USB to create the backup that might cause a conflict?
 
Yes. For some reason, it's not working. I need to add every folder on the USB drive.

Does it give you any error messages or logs when you tried? Or does it just ignore that value and backup the entire drive anyways?

Might help reference where to look specifically in the code if it does give any type of failure
 
Yes. It ignores that value and tries to back up everything, and for this reason, it takes forever because I have around ~100 GB of files.
What is the use case here? What are you trying to back up? Just the router settings?

Would you not just exclude the main folder that has the 100GB of files? And leave the rest of the standard folder structure for entware and whatnot for backup purposes?
 
What are you trying to back up? Just the router settings?
Correct. nvram and jffs.

Would you not just exclude the main folder that has the 100GB of files? And leave the rest of the standard folder structure for entware and whatnot for backup purposes?
Technically, I can, and I already excluded the main folder along with the other ones. But I don't use entware, and my external drive itself is a backup location for everything, including the router settings. So it doesn't make sense to try backing up anything on that drive. Also, there are some hidden files that I don't need to back up.

It doesn't need to be specifically a UI option. At least a working wildcard like this would be nice:
Code:
/mnt/DRIVE/*
I tried it initially, but unfortunately, it didn't work.

Of course, it is just a suggestion on how to improve backupmon. 🙂
 
Correct. nvram and jffs.

Technically, I can, and I already excluded the main folder along with the other ones. But I don't use entware, and my external drive itself is a backup location for everything, including the router settings. So it doesn't make sense to try backing up anything on that drive. Also, there are some hidden files that I don't need to back up.

It doesn't need to be specifically a UI option. At least a working wildcard like this would be nice:
Code:
/mnt/DRIVE/*
I tried it initially, but unfortunately, it didn't work.

Of course, it is just a suggestion on how to improve backupmon. 🙂
Well, I do have some built-in functionality where if backupmon doesn't detect a USB drive, then it assigns this variable as "NOTFOUND":

Code:
EXTLABEL="NOTFOUND"

It basically goes through the whole backup process and just backs up the nvram and jffs. It ignores the EXT drive in this case.

So a quick workaround that "should work" would be to alter line 6025:

Code:
6023 # Check to see if EXT drive exists
6024 USBPRODUCT="$(nvram get usb_path1_product)"
6025 EXTLABEL="$(_CheckForMountPointAndVolumeLabel_)"
6026 LABELSIZE="$(echo "$EXTLABEL" | sed 's/ //g' | wc -m)"

and should look like this:

Code:
6023 # Check to see if EXT drive exists
6024 USBPRODUCT="$(nvram get usb_path1_product)"
6025 EXTLABEL="NOTFOUND"
6026 LABELSIZE="$(echo "$EXTLABEL" | sed 's/ //g' | wc -m)"

Should hold you over for the meantime... not sure I'm going to make this an option since it's such an unusual use-case.
 
Should hold you over for the meantime... not sure I'm going to make this an option since it's such an unusual use-case.
Thank you for the detailed explanation. Well, maybe I've been thinking in a different way than other members of the community, but my first thought was to use a USB drive specifically as a backup location for everything - my Mac settings (I back them up using Arq Backup over SMB) and the router settings. It's good enough even without other actions like uploading a copy to the cloud cold storage because you already have the same data in two places. I was a bit confused when I didn't find an option to exclude a drive, even when using the exceptions list. In this scenario, it doesn't make sense to back up a drive to itself.
 
Thank you for the detailed explanation. Well, maybe I've been thinking in a different way than other members of the community, but my first thought was to use a USB drive specifically as a backup location for everything - my Mac settings (I back them up using Arq Backup over SMB) and the router settings. It's good enough even without other actions like uploading a copy to the cloud cold storage because you already have the same data in two places. I was a bit confused when I didn't find an option to exclude a drive, even when using the exceptions list. In this scenario, it doesn't make sense to back up a drive to itself.
I get it. ;)

I did some searching around for a tar exclusion that might catch everything... perhaps this might work in your exclusion file?

Code:
./*
 
Unfortunately, it excludes all jffs files as well.
Ahhh. Yes, it would. ;(

Welp, I'm going to have to recommend trying the "NOTFOUND" option in this case then.

Alternatively... and it might take a little work, but restructuring your external drive folder layout might help make things simpler. For instance, if you had a folder layout like this:

Code:
/ISOs
/movies
/music
/recipes
/shipping_labels

Perhaps dumping all these folders you want to "exclude" from backup, and putting them under their own folder:

Code:
/DONTBACKUP
   /ISOs
   /movies
   /music
   /recipes
   /shipping_labels
/entware

Then you would just need to make 1 entry in the exclusion file:

Code:
DONTBACKUP/*
 
Last edited:

Latest 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!
Back
Top
âś–