09-06-2014 11:04 PM
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:
- Make clear under the 'possible completions' that both files and directories are supported.
- In case a directory path is specified, generate a file name like the one that is currently generated - just not starting with a dot.
- 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.
09-06-2014 11:11 PM
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 | paid consultation available
09-07-2014 09:59 AM
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.