Upcoming Maintenance Alert:

The UBNT Community will be upgraded at 5pm MDT on April 25th. During this time the community forums will be set to read-only status.

Learn more

×
Reply
Regular Member
Posts: 317
Registered: ‎04-25-2014
Kudos: 217
Solutions: 13

Bug: generate tech-support archive directory behavior

Today I was trying to generate a "tech-support archive" for my own archival purposes, when I encountered some strange behavior. The command supports the following options:

admin@ubnt-er-poe:~$ generate tech-support archive
Possible completions:
  <Enter>       Execute the current command
  <file>        Generate compressed tech-support archive at the specified path
  <scp://<user>:<passwd>@<host>/<file>>
  <ftp://<user>:<passwd>@<host>/<file>>


admin@ubnt-er-poe:~$

 So I wanted to try to generate the archive at a specified path*, so I did the following:

admin@ubnt-er-poe:~$ generate tech-support archive /tmp/
Saving the archivals...
Saved tech-support archival at /tmp/.ubnt-er-poe.tech-support-archive.2014-09-07-074315.tgz
admin@ubnt-er-poe:~$

 As you can see, EdgeOS just generated a *hidden* archive in /tmp/. That is quite annoying, because even after making the archive 'visible' on again (by removing the initial dot from the file name), it extracts by default to ".ubnt-er-poe.....", so to a hidden directory.

 

Then I thought that "generate tech-support archive" appartently expects a file path rather than a directory path, so I did the following:

generate tech-support archive /tmp/ubnt-er-poe.tech-support-archive.2014-09-07-075015.tgz
Saving the archivals...
Saved tech-support archival at /tmp/ubnt-er-poe.tech-support-archive.2014-09-07-075015.tgz.ubnt-er-poe.tech-support-archive.2014-09-07-075052.tgz
admin@ubnt-er-poe:~$

 Wow, so even after specifying the exact file path, EdgeOS appends a String (starting with a dot again, which is the dot that made the archive hidden, initially). I would say that this is not really intuitive either. I therefore propose the following changes:

  1. Make clear under the 'possible completions' that both files and directories are supported.
  2. In case a directory path is specified, generate a file name like the one that is currently generated - just not starting with a dot.
  3. In case a file path is specified, stick to the file path. In case the specified file path does not end with ".tgz", append that extension.

*) Personally, I find 'path' to be rather directory-ish, rather than file-ish. The command seems to expect a directory path though, so I would suggest changing "<file>" into "<path>".

 

My ERPoE is running EdgeOS v1.5.

SuperUser
Posts: 21,708
Registered: ‎11-20-2011
Kudos: 7799
Solutions: 233

Re: Bug: generate tech-support archive directory behavior

Er, what? These archives are for Ubiquiti to diagnose problems, not end users.

 

If you're trying to backup the system config, you can do that much the same way (to a local or remote directory) as well.



isp builder | linux sorcerer | datacenter automation conjurer | blog: blog.engineered.online
link to our slack channel on the blog
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5401
Solutions: 1656
Contributions: 2

Re: Bug: generate tech-support archive directory behavior

Yeah the current behavior is that the argument to "generate tech-support archive" is prepended to the ".<hostname>.tech-support-archive.<current_time>" string. So "generate tech-support archive /tmp/xyz" generates "/tmp/xyz.ubnt-er-poe.tech-support-archive.2014-09-07-074315.tgz", for example. And "generate tech-support archive xyz" generates "/config/support/xyz.ubnt-er-poe.tech-support-archive.2014-09-07-074315.tgz" (default path /config/support is used since no absolute path is provided). You are right that this is not really intuitive and perhaps the help text can be improved. Thanks for the feedback.

Reply