• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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