--force option not working with /usr/local/cpanel/bin/backup
Since I upgraded WHM to 116.0.x, the --force option is no longer working when used to run a cpanel backup from shell. In the past the --force option would have started the backup again even if it had already run on that day. Error message is below
]# /usr/local/cpanel/bin/backup –-force
[2024-02-01 11:57:07 -0700] info [backup] Started at Thu Feb 1 11:57:07 2024
[2024-02-01 11:57:07 -0700] info [backup] Backups have already run today. Use the --force if you wish to run backups again.
-
The --help option also does not work any longer:
# /usr/local/cpanel/bin/backup –-help
[2024-02-01 12:00:22 -0700] info [backup] Started at Thu Feb 1 12:00:22 2024
[2024-02-01 12:00:22 -0700] info [backup] Backups have already run today. Use the --force if you wish to run backups again.0 -
Ah - I think I see the problem - try typing the double dashes before the help/force command. I tried to copy your " /usr/local/cpanel/bin/backup –-help " on to my cPanel 116.0 and 118.0 servers and both came back with non-help text, however manually typing the command worked...
It turns out that the FIRST – symbol included in your post is actually the character 2013 (EN DASH) whereas the second - is 002D (HYPHEN-MINUS) which is expected on the command line.
0 -
Thanks rbairwell for replying. I think you are correct, but the --force has been in scripts for a couple years and running correctly and suddenly stopped. Also now just one "dash" with the option will work which I don't think it used to. Anyways, I edited my script and am just using 1 dash now and the options are working. Thanks for pointing me in the correct direction
0 -
I did actually mean for you to use two hypen-minus (as previously you were using one en-dash followed by a hyphen-minus) so I'm actually surprised to find it worked with a single one.
As to why it stopped working... I'll hazard a guess that upon the upgrade something changed in the language settings (either by cPanel or - and probably more likely - a Linux item being updated) which stopped automatically converting the Unicode en-dash to a "standard US/UK keyboard" hyphen-minus.
Glad it's working though :D
0
Please sign in to leave a comment.
Comments
4 comments