What's new

amtm Segmentation Fault in AMTM

  • 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!

Also, I created an exclusions file for the tar command in order to minimize size of archives. Simply a text file containing a list of files not to be backed up from USB. mine currently contains:
Code:
myswap.swp
entware/var/log/*
skynet/skynet.log
Add flag to tar command:
Code:
-X /jffs/scripts/exclusions
 
Also, I created an exclusions file for the tar command in order to minimize size of archives. Simply a text file containing a list of files not to be backed up from USB. mine currently contains:
Code:
myswap.swp
entware/var/log/*
skynet/skynet.log
Add flag to tar command:
Code:
-X /jffs/scripts/exclusions
In total, my SSD/USB ext drive finished around 65MB after creating the tar.gz. It seems it was really able to compress it down my 5GB swap file because it's basically empty. But that's a great idea to just exclude all this stuff.
 
Got this working across the network to a share on my server... thanks so much, @Jeffrey Young! This is really my first experience using tar... so I had another question:

What would be the easiest way to restore one of these backups incase of a major issue with the attached storage? Would there be an easy way to run a command using the variables you're capturing in your script above to basically reverse/restore the backup using the same methods back to the same paths? What would that look like? Is there a way to automate this more should something would need to be restored?

Would it be as easy as:
Code:
tar -xf ${EXTDRIVE}${BKDIR}/${DAY}/jffs.tar.gz -C /jffs
tar -xf ${EXTDRIVE}${BKDIR}/${DAY}/SSDDrive.tar.gz -C $SSDDRIVE

Thanks!
Yep. I would use tar -xzf just to tell tar that the archive is zipped. Tar should figure it out on its own, but you never know.
 
Yep. I would use tar -xzf just to tell tar that the archive is zipped. Tar should figure it out on its own, but you never know.
In a realistic situation, we'd probably need to follow some steps at @visortgw mentioned... I would rather not have to go through the process of manually unhooking/copying files over, and try to keep this as automated as possible... thoughts?
My attempt at this:
  1. Format new USB drive on router.
  2. Unmount USB drive, and attach to NAS or server.
  3. Mount on NAS or server.
  4. Copy file.tar.gz to newly formatted drive while attached to NAS or server.
  5. Unmount USB on NAS or server.
  6. Reattach/mount on router.
  7. gunzip file.tar.gz
  8. tar xf file.tar
  9. rm file.tar

Revision:

1.) Format a new SSD drive on router, calling it the same name as before
2.) Enable JFFS scripting in the router OS, and reboot
3.) Restore the backup sh script (or restore script, using the same variable names defined for the various paths)
4.) Run the following from the router restore script:

Code:
tar -xzf ${EXTDRIVE}${BKDIR}/${DAY}/jffs.tar.gz -C /jffs
tar -xzf ${EXTDRIVE}${BKDIR}/${DAY}/SSDDrive.tar.gz -C $SSDDRIVE

5.) Reboot... and I think everything would then continue functioning as normal... right!? ;)

I'm going to guess that the major modprobe, mount, tar and umount commands are going to be included out-of-the-box after a fresh install without requiring entware...

What are your thoughts?
 
My attempt at this:
  1. Format new USB drive on router.
  2. Unmount USB drive, and attach to NAS or server.
  3. Mount on NAS or server.
  4. Copy file.tar.gz to newly formatted drive while attached to NAS or server.
  5. Unmount USB on NAS or server.
  6. Reattach/mount on router.
  7. gunzip file.tar.gz
  8. tar xf file.tar
  9. rm file.tar
I mount the NAS manually from the router, CD to the remote folder, then just do a tar -xzf back to the USB drive
 
I'm going to guess that the major modprobe, mount, tar and umount commands are going to be included out-of-the-box after a fresh install without requiring entware...
Correct
 
When I had to restore my USB key, I mounted the new key and formatted with AMTM and labelled the drive accordingly. I then manually mount the NAS folder from the router shell, CD to the remote folder and do a tar extract back to the USB key.

I don't use any exclusion rules. I want speed as opposed to having to remember to recreate swap space, etc.
 
When I had to restore my USB key, I mounted the new key and formatted with AMTM and labelled the drive accordingly. I then manually mount the NAS folder from the router shell, CD to the remote folder and do a tar extract back to the USB key.

I don't use any exclusion rules. I want speed as opposed to having to remember to recreate swap space, etc.
I've come across situation where restored swap file has not been recognized, but YMMV.
 
Hi,

Recently I've been getting Segmentation Faults in AMTM:

View attachment 52638

Everything is still working add-on wise - Skynet, YazFi etc. all still working.

Rebooting makes the issue go away and AMTM loads correctly. but after an undisclosed amount of time, checking AMTM again shows the errors.

Do I need to format the USB or try with a new USB stick and set everything up again?

If so, what are the correct steps to do this?

Cheers!
Gary
Check the Entware installation of grep that you probably have in /opt/bin/grep. Force a reinstallation of the package and any of its dependencies.
Maybe @Gary_Dexter can provide an update on his situation before it gets lost in all the noise.
 
Maybe @Gary_Dexter can provide an update on his situation before it gets lost in all the noise.
New day, new error.. not had this one before....

1693304249029.png
 
As previously speculated it seems most likely that the USB drive is corrupted. What sort of drive is it?

I would disable scripts and configs in the GUI and reboot the router. Then I would unmount the drive through the GUI, SSH into the router and perform an fsck on the drive. If you already had the disk check option enabled through amtm check it's log as well.
 
As previously speculated it seems most likely that the USB drive is corrupted. What sort of drive is it?

I would disable scripts and configs in the GUI and reboot the router. Then I would unmount the drive through the GUI, SSH into the router and perform an fsck on the drive. If you already had the disk check option enabled through amtm check it's log as well.
It's just a generic 8GB USB stick.

I'm happy to just scrap it and use a new USB stick and start again from scratch.
 
Ideally you'd want to uninstall all the addons that were on the USB drive so that the modifications they made to /jffs are undone. As you're probably not able to do that you'd either have to manually remove those /jffs modifications or wipe the entire /jffs partition (i.e. a hard factory reset). Or you could just leave those there and hope for the best.

For the new USB drive it's simply a matter of formatting it in a PC to remove any existing data and then plugging it into the router. Then use amtm's fd option to format it.
 

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!

Staff online

Top