• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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