Plesk 12.x / Linux :: CLI - Scheduled Backup From Command Line

Apr 9, 2015

I'm looking to set up a schedulled backup from command line.

I haven't found the correct command, could you tell me if it's possible and how ?

Additional question: I'm looking too, to set for the server the max number backup file to save, do you know how to do it from cli ?

View 8 Replies


ADVERTISEMENT

Plesk 12.x / Linux :: Remove Backup Via Command Line?

Jan 17, 2015

Is there a command line way of removing Plesk backups?

I'm looking for the command line equivalent of these steps: Log into Plesk as the server admin > "Tools & Settings" > "Tools & Resources" > "Backup Manager" > check a backup and click "Remove".

We have a script that copies the contents of "/var/lib/psa/dumps/" to Amazon S3 for long-term storage of backups. It runs nightly after a scheduled Plesk backup. Once that script completes successfully, we'd like to delete the Plesk backup to free up disk space. We have Plesk's "Maximum number of backups in the repository" set to 1.

But Plesk appears to keep that backup around while creating a new backup (which makes some sense). This is causing us trouble because the server does not have enough disk space for two backups. As a temporary solution, I'm manually deleting the backup each day through the Plesk admin, but would like to automate it if possible. If automation is overly complex/risky, we'll look at upping our disk space instead.

View 4 Replies View Related

Plesk 12.x / Linux :: Command Line CLI DNS Template Changes Warning

Jul 23, 2015

I'm using this script as a cron to generate DKIM keys for the domains I have. It's an easy script. And it does it's job just OK. I have the necessary software installed and configured.

The way it works is:

The script check if the domain in queue has a record for it. If it doesn't, OpenDKIM generates a one time DKIM record for mail._domainkey that I am entering to my dns records for all the domains I have.

After creating the DKIM record, it checks and deletes mail._domainkey records if there's any. Then adds the generated DKIM to plesk dns zones and disables/enables greylisting to create the appropriate dns entry.

If it does have a DKIM recors on the hdd already, then it removes

mail._domainkey​and
TXT o=-​entries.

After that it basically adds the already generated DKIM record and it disables/enables the greylisting for each domain in order to recreate "TXT o=-"

Up till here, it works fine. I can see these entries when I check the DNS Settings. They are there.

But whenever I run this script either via cron or manually, I get an error message on my panel: (You can check the screenshot as well)

Code:

Warning: The DNS zone was modified. If you would like to apply DNS template changes to this zone, either click the 'Apply DNS Template Changes' button on this page or choose the 'Apply the changes to all zones' option in Server Administration Panel > Tools & Settings > DNS Template Settings > Apply DNS Template Changes.

And unless I manually click "Apply DNS Template Changes" for EVERY SITE it doesn't go away.

So, I was wondering, is there a way to scriptize that command? Or how to prevent it?

This is the command I use to generate DKIM and add it to Plesk database, also if any such record exists, delete and re-write it:

Code:

#!/bin/sh
ADMIN_PASS=`cat /etc/psa/.psa.shadow`
MYSQL_BIN_D=`grep MYSQL_BIN_D /etc/psa/psa.conf | awk '{print $2}'`
mysql="${MYSQL_BIN_D}/mysql -N -uadmin -p${ADMIN_PASS} psa"

query="select name from domains;"
domains=`echo $query | $mysql `
for i in ${domains}; do
echo "Processing $i"

[Code] ....

View 4 Replies View Related

Plesk 12.x / Linux :: Command Line Mail In Chroot?

Feb 23, 2015

Is there any way for a client to use command line mail in a script. Client has ssh access via chromed environment.

Wants their script to be able to send an email on completion.

plesk 12 on Centos6.6

View 6 Replies View Related

Plesk 11.x / Linux :: Can't Sync Subscription With Command Line Interface

Dec 9, 2014

I have a subscription and I'm able to switch the subscription to a given service-plan, but I'm unable to sync the subscription with the plan, using the CLI. These are my commands:

/usr/local/psa/bin/subscription --switch-subscription <domain.com> -service-plan Hosting

result => The subscription <domain.com> is now associated with the service plan Hosting..When watching the webinterface in Plesk, I see the domain is "connected" to the service plan, so far so good. However, I notice that the subscription is not synced.

Back to the CLI, I've tried some combinations, but I can't get the subscription synced. The webbased interface keeps telling me that the subscription is unsynced. Here is what I've tried:

/usr/local/psa/bin/subscription --sync-subscription <domain.com>

And I also unlocked it (just in case it was locked) like so: /usr/local/psa/bin/subscription --unlock-subscription <domain.com>

The funny part is that the CLI tells me: "Subscription <domain.com> was synchronized with the associated service plans." but unfortenately it's not if I look through the GUI. Only if I click the sync-option webbased the subscription get synced. we have to transfer over 1000 domains and need to sync these domains with a given service-plan.

View 1 Replies View Related

Plesk 12.x / Linux :: DNS Command Line Utility Fails To Delete TXT Record

Apr 7, 2015

Although running
>>
/usr/local/psa/bin/dns --info dev.sname.c002.aname.domain.com
>>
shows the 'ecz1' TXT record exists for "dev.sname.c002.aname.domain.com" :
...
ecz1.dev.sname.c002.aname.domain.com. TXT ecz1

[Code] ....

The issue can be caused by extra spaces in the TXT record:

Code:
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --add dev.sname.c002.aname.domain.com -txt 'ecz1 ' -domain ecz1
SUCCESS: Creation of DNS record in Domain 'dev.sname.c002.aname.domain.com' complete.
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt 'ecz1' -domain ecz1
Unable to del record in DNS server: unable to find DNS record

In the following example I have 3 such TXT records with 3, 5, 7 extra spaces and remove record with 3 spaces:

Code:
[root@a10-52-143-28 ~]# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "select host, val, (length(val) - length(rtrim(val))) as extraspaces from dns_recs where host='ecz1.dev.sname.c002.aname.domain.com.' and val like 'ecz1%'"
+---------------------------------------+-------------+-------------+
| host | val | extraspaces |
+---------------------------------------+-------------+-------------+
| ecz1.dev.sname.c002.aname.domain.com. | ecz1 | 5 |
| ecz1.dev.sname.c002.aname.domain.com. | ecz1 | 3 |

[Code] ...

Click to expand...
Click for original message

View 12 Replies View Related

Plesk 12.x / Linux :: Scheduled Backup Not Working?

Nov 5, 2014

I am running Plesk 12 on CentOS 7 64bit. I have set up the server backup instead of the website backup as I assume that will backup all server settings, as well as the website? I am running Plesk Web Admin Edition.

I have the backup set to run and dump into Personal FTP, but it does not run. If I run the backup manually, everything works great, but the scheduled backups don't work.

View 3 Replies View Related

Plesk 12.x / Linux :: Error During Scheduled Backup Process

Jun 18, 2014

Sometimes I get this error:

Domain: mydomain.com

Plesk entry point: https://myserver.local:8443/

Following error is occurred during scheduled backup process:

[Errno 17] File exists: '/usr/local/psa/PMM/logs/backup-2014-06-18-23-30-05-556'

but in the backup.log and in the pmmcli.log I don't found any error.

What does it mean?

View 8 Replies View Related

Plesk 11.x / Linux :: Upgrade Scheduled Backup Not Working?

Jul 6, 2012

I have the same problem again with plesk 11 [URL]

workaround
1) rpm -q --scripts psa-backup-manager | sed 1d | sh
2) /etc/init.d/crond restart

my error message with CentOS 5.8, Plesk 11.0.9 MU#4
sh: line 2315: syntax error near unexpected token `('
sh: line 2315: `preuninstall scriptlet (using /bin/sh):'

/etc/cron.d/plesk-backup-manager is created

why do not work after you upgrade the backup cronjobs?

View 19 Replies View Related

Plesk 12.x / Linux :: Scheduled Backup Don't Load (cron Job)

Jul 14, 2015

Plesk Backup work when we make instant backup but not with scheduled backup.

There is nothing in the log files (pmmcli.log & migration.log).

How can we correct?

Plesk 12 / Centos

View 1 Replies View Related

Plesk 12.x / Linux :: Scheduled Backup Stopped Working

Feb 12, 2015

on one of our Plesk-Servers (Plesk 12.0.18 Update 34 on Debian 7.6) the scheduled backup stopped working. Scheduled Backup is active in Backup-Manager, but it's not executed.

View 2 Replies View Related

Plesk 12.x / Linux :: Global Scheduled Backup Task Not Working

Dec 19, 2014

I'm running: 12.0.18 Update #29

I'm having troubles getting the global scheduled backup task to work at Home > Tools & Settings >Backup Manager > Server Repository.

At a subscription the scheduled backup works how it should.

Home > Subscriptions > example.com > Websites & Domains > Server Repository

The problem is as follows: When I set the scheduled task at a specific time example 00:00 it does not run at all. But when I just do "Create a backup" it does work...

I've done [URL] .... and everything in here is configured how it should be.

This is my configuration for scheduled task:

Cronjob is placed in : /etc/cron.d/plesk-backup-manager-task

Also did run: rpm -q --scripts psa-backup-manager | sed 1d | sh

This problem is only in the global backup configuration.

View 3 Replies View Related

Plesk 12.x / Linux :: Scheduled Backup Hangs At 100% - Never Finishing Completely

Jan 24, 2015

I have an issue with my daily backup. I configured to have a daily backup on an external FTP server. Everything looks to work correctly but in the panel I see that the task is a 100% forever. Never finishing completely.. So the next day, the task is not starting.. I have to remove manually the task in backup manager screen.

here is the last lines of the log file (in /var/log/plesk/PMM/backup-2015-01-20-20-46-02-824)

[2015-01-20 21:33:53.108|18485] INFO: ENV[LANG]=en_US.UTF-8
[2015-01-20 21:33:53.108|18485] INFO: Executing utility: /bin/sh -c -e /bin/tar --create --file /usr/local/psa/PMM/tmp/backupznMOWN/daily__1501202046.tar --directory /tmp/repo_transport_tmp_Jalkfn/ --dereference --files-from /tmp/repo_transport_tmp_UTCFhv
[2015-01-20 21:41:12.528|18485] INFO: The utility executed with the return code 0

[Code] ....

View 19 Replies View Related

Website Backup Over Command Line

Nov 7, 2008

We have a dedicated server, with chroot access enabled.

We are wanting to backup each site on this server, as well as all mysql dbs on a weekly basis.

Is it possible for us to run a cron job to do this? If so, what commands would we want to use?

We have a local FTP server here, so would like to ftp these backups this machine.

I know it all sounds a little vague, but I just need to know where to get started.

View 3 Replies View Related

Plesk 12.x / Linux :: Required Storage For Multi-volume Scheduled FTP Backup

Apr 8, 2015

My Centos server running Plesk12 is running scheduled backups every sunday 3AM.

The backup is configured so that it's created as a multivolume backup with a volume size of 2047MB.

The backup is placed on my Personal FTP repo (another plesk12 server mounted with big storage).

The backup content is configured to backup server config and content (all).

The problem I have is when the backup is running I can see that it creates the volumes and stores it locally. After it send all the volumes the the external FTP repo it will delete the local (tmp) data. See my attached screenshot for storage health during backup.

Is this behaviour normal? This way we can never run a backup to an external FTP repo when our server passed 50% storage. Is it not normal to:

- Create a volume
- Send it to FTP repo
- Delete volume locally
- Repeat until done

View 5 Replies View Related

Plesk 11.x / Linux :: How To Do MySQL Database Daily Backup Via Scheduled Tasks

Feb 12, 2015

I'm new to Parallels Panel. I use version 11.0.9. I want to backup mysql database daily. First of all, what is the best way for daily database backup in plesk. I'm trying to do this in Scheduled Tasks and I use mysqldump command although I'm not sure.

I chose the time and day first and then I switched on the task. I typed the following command to Command line.

mysqldump -uusername -ppassword databasename | gzip -9 >/httpdocs/mydatabase.sql.gz
or
mysqldump -uusername -ppassword databasename >/httpdocs/mydatabase.sql.gz

This created only a blank file. When I use this without gzip, nothing changes.

1- Is mysqldump right command for database backup?
2- Should I define full path for mysqldump, gzip and database? If so, how can I find out the full path of mysqldump, gzip and my database? Because I can't see their locations in panel.
3- I can't see any error message. There is not any log file in httpdocs folder. Where does the log file exist?
4- It is weird but should the username be "database user" or should I write "root" ?

View 2 Replies View Related

Plesk 11.x / Windows :: How To Run A Task After Scheduled Backup

Oct 29, 2014

Is there a way to run an additional task after the scheduled backup has completed?I want to copy the backup off-site. I can't use FTP, otherwise I'd use the built-in 'Personal FTP Repository' feature. (See Rsync, Amazon S3, Rackspace cloud files, etc)

I could just create a new scheduled task, but the backup takes an unpredictable amount of time, and the tasks need to run sequentially. Also, the 2nd task should only run if the backup succeeds.

I could disable the backups in the control panel and create a new scheduled task that does both the backup and the additional task. But then the functionality of the control panel's Backup Manager page is lost.

View 4 Replies View Related

Plesk 12.x / Windows :: Local Scheduled Backup Error

May 22, 2015

I have recently upgraded Plesk Panel from 11.0.5 windows to 12.0.18 MU#46 windows.

As checked that local plesk backup via GUI throwing error and is not working. On checking the event viewer I found below event during backup run.

Log Name: Plesk
Source: scheduled_backup.exe
Date: 5/23/2015 6:52:06 AM
Event ID: 1
Task Category: None
Level: Warning

[Code] ....

View 1 Replies View Related

Plesk 12.x / Linux :: Scheduled Tasks Not Working?

Feb 4, 2015

I have created a scheduled task as per my application guide as in the attached file. When i recieve the email it says the following:

: /var/www/vhosts/testdomain.co.uk/clients/admin/cron.php: No such file or directory

i have also tried appending:

php -q
wget -O (using the http to the location to cron.php)

Nothing seems to work.

I have transfered from cpanel and this is my first scheduled task and not getting anywhere with very little information on how to do this.

Im running:

Plesk 12
Linux

View 1 Replies View Related

Plesk 12.x / Linux :: Scheduled Tasks Not Accessible

May 28, 2015

after creating a new cron job, when i try to open Scheduled Tasks i get this error :Internal error: DateTime::__construct(): Failed to parse time string (2015-05-28 0.12:0:37) at position 17 ): Unexpected character

Message DateTime::__construct(): Failed to parse time string (2015-05-28 0.12:0:37) at position 17 ): Unexpected character
File Helper.php
Line 143
Type Exception

View 1 Replies View Related

Plesk 12.x / Linux :: Scheduled Tasks Always Fail?

Feb 17, 2015

Whenever a user in my Cloudlinux powered Plesk Panel 12 tries to use the scheduled tasks, this is the error that is emailed to them...

excel: couldn't exec `/usr/local/psa/bin/chrootsh'
excel: No such file or directory

Does not matter what the task is, same error every time.

Even something as simple as wget [URL] .....

View 10 Replies View Related

Plesk 12.x / Linux :: Scheduled Tasks For User Root

Jun 27, 2014

Looking at a server with Plesk 12 installed there is no root user shown in tools & settings / scheduled tasks.

Login as root and crontab -l shows root has some tasks.

On a similar server with Plesk 11.5 installed can see root user shown in tools & settings / scheduled tasks.

View 1 Replies View Related

Plesk 11.x / Linux :: CRON Is Not Executed (scheduled Tasks)

Oct 23, 2014

plesk 11.5
centos 6

We set a couple of task with domain user but the cron is not executed.

We tried 2 kind of task to run every minute

/usr/bin/php /var/www/vhosts/domain.com/httpdocs/cron.php
and
mail -s "Hello" admin@domain.com

1) Why scheduled task are not executed?
2) Where the tasks are written in filesystem from plesk ? /etc/....?

View 3 Replies View Related

Plesk 12.x / Linux :: After Update To 12.0.18 Scheduled Task Not Running?

Sep 21, 2014

I recently updated from 11.5 to 12. After the update, my simple "Websites & Domains->Scheduled Tasks" is no longer executing.

I verified that the task is still present in Plesk and enabled.

The simple task launches one of my PHP web pages to perform an action:

(set to once a day: Min=30, H=7, DM=*, M=*, DW=*)
wget --quiet --delete-after "http://www.MYWEBSITE.com/some/path/index.php?someparam=somevalue"

This cron job had been working fine for more than a year but stopped working after the update.

View 8 Replies View Related

Plesk 11.x / Linux :: Scheduled Tasks - Correct Permissions

Jun 2, 2014

I have the following command to execute every 5 minutes this PHP file which is working correctly:

/usr/bin/wget -qq -O /dev/null http://url.com/script.php

How can I make it so only the system (scheduled task or the server itself) can access to the file to execute it. I tried placing CHMOD 700 to the PHP file but everyone is still able to access to it and executive it.

Plesk version: 11.5.30 Update #44

View 2 Replies View Related

Plesk 12.x / Linux :: Domain Scheduled Tasks (Client Area)

Jul 22, 2014

We have a VPS with Centos 5 and Plesk 12.0.18.

The CRON service is running and works correctly, the Scheduled tasks on the administration Plesk Panel (tools & Setting / Scheduled tasks / root user) works ok, but when a customer sets a new scheduled task from her domain panel, don't works.

The task is a simple WGET command.

View 3 Replies View Related

Zip From Command Line

Feb 15, 2009

Im trying to zip up an sqlite database backup.

I execute this command

Code:
zip ../d/db/backup.zip ../d/db/09-02-15.sqlite
backup.zip never appears. Instead, I get some random filename in the directory. Like ziOHokOw

If I try to zip a smaller file(last weeks backup) everything runs fine?

Code:
zip ../d/db/backup.zip ../d/db/09-02-08.sqlite
So the 134mb file zips fine, but the 200mb one seems like its failing and im left with some type of temporary file. I tried downloading the weird filename and unzipping it. It has partial info like directory structure, the filename but the actual file inside is corrupt.

View 1 Replies View Related

What Is The Command Line

May 10, 2008

What is the Command Line, hoe do I get to it, when I do how do I update Perl to 5.88

View 5 Replies View Related

Plesk 12.x / Linux :: Scheduled Task - Undelivered Mail Returned To Sender

Dec 20, 2014

I'm problem with crone sender email. I changed the version of the panel from 11.5 to 12. After start the corne and sehedule task in one of users I recived email. The crone task starts from email.

For this example, I replaced the user name in Plesk Panel, which is assigned cron jobs on “support”.

This is the mail system at host servername.domainname.

I'm sorry to have to inform you that message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

The mail system

<-f@domainname> (expanded from <-f>): bad address syntax
<support@domainname>: Host or domain name not found. Name service
error for name=support.domainnametype=AAAA: Host not found

[Code] ....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved