• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Backups problem!

Peter-

Basic Pleskian
Can someone tell me why is " >/dev/null 2>&1" at the end of my cron job commands causing error backup errors?

I assume it happens when parsing the XML, because of the >.

Can anyone suggest / provide a fix?

Thankx
 
>> /dev/null redirects standard output (stdout) to /dev/null, which discards it. (The >> seems sort of superfluous, since >> means append while > means truncate and write, and either appending to or writing to /dev/null has the same net effect.

2>&1 redirects standard error (2) to standard output (1), which discards it as well since standard output is already redirected.
 
It shouldn't cause any errors! Can you please provide the error message you are getting?
 
"Domain: example.com. Cannot create dump" (from the plesk UI).

After further investigation (I followed some steps someone suggested on a separate thread), I found some error in the logs.

If I take that out, the backup manager works fine. If I take it out from the first entry (I have 2 tasks in there), it works fine. IF there's a > between them, it fails.

Look here for more info: http://forum.parallels.com/showthread.php?293320-Backup-Fails
 
I only half understand this stuff, so don't assume what I'm about to say is correct, OK?

Typically, in a cron task, you'll see ">/dev/null 2>&1" appended to the end of the specified command.
The sole purpose of this is to prevent you receiving an email with any output at all produced by the task when that cron task was run. For example, if you had something that ran ever 5 minutes and output "Done" or something each time, you'd receive an email ever 5 minutes from cron with "Done" in it UNLESS you add ">/dev/null 2>&1" to the end of the command *in the box in Plesk where you enter the cron command* (i.e. not in any bash .sh script you might be invoking).

I'm not sure from what you posed in the other thread, but you seemed to possibly be doing some stuff that did not look right. Typically you'd write a bash .sh script with whatever you wanted cron to do and invoke that from cron. You would not cd this and cd that then run a command in the cron task command box itself - you'd do that in a script instead, and then just have "sh /location/whatever.sh >/dev/null 2>&1" in the cron command line.
whatever.sh would have the actual commands you want to run (including any cd this etc), with no ">/dev/null 2>&1" in it anywhere.

Does that help at all?
 
Hello

No, adding >/dev/null to the end of my command conflicts with the backup tool. That's my issue. Why is the xml parser not working correctly? :)

Thanks!
 
Back
Top