• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved Change backup location in Linux

Marcel Caspar

New Pleskian
Hello,


I could not find any thread that is targeting my issue.

I changed the backup location of my backups in /etc/psa/psa.conf to a mounted storage, according to this tutorial.

After that I started a new manual backup job via the web interface and got the following error "Der Backupvorgang ist fehlgeschlagen: Not enough free disk space to backup selected objects. At least 3166.8235733 MBytes free disk space is required."

My configuration:
DUMP_D /mnt/block-storage/plesk_backups
DUMP_TMP_D /mnt/block-storage/plesk_backups_tmp

Both directories are owned by psaadm

On my main partition are 1.6GB diskspace available. On /mnt/block-storage/ are 56G available

I am confused why my backups job is failing, since I moved the backup location and the temp backup location on a disk that has enough diskspace available.

Setup:
Version 17.8.11 Update #10
Debian 8.10‬
 
In this case, we need more detail of this issue. At least part of backup logs with related error messages.
 
Hope it's okay when I paste this just as text. Could not upload a .log or .txt file

backup.log
[2018-06-07 10:50:14.927|43632] INFO: pmm-ras started : /opt/psa/admin/sbin/pmm-ras --get-incremental-base --dump-storage=/mnt/block-storage/plesk_backups --dump-prefix=backup --type=server --guid=e3235e75-2978-4b19-8d13-9bab5de2e05e --$[2018-06-07 10:50:14.932|43632] INFO: Repository '/mnt/block-storage/plesk_backups': Initializing...
[2018-06-07 10:50:14.935|43632] INFO: Repository '/mnt/block-storage/plesk_backups': Initialized
[2018-06-07 10:50:14.937|43632] INFO: Check .last-dumps
[2018-06-07 10:50:14.938|43632] INFO: Check .fs_NaN_0
[2018-06-07 10:50:14.938|43632] INFO: Check mysql.preupgrade.apsc.17.5.3-17.8.11.20180607-100001.dump.gz
[2018-06-07 10:50:14.938|43632] INFO: Check clients
[2018-06-07 10:50:14.938|43632] INFO: Check .discovered
[2018-06-07 10:50:14.938|43632] INFO: Check mysql.preupgrade.17.5.3-17.8.11.20180607-095958.dump.gz
[2018-06-07 10:50:14.938|43632] INFO: pmm-ras finished. Exit code: 0
[43621]: 2018-06-07 10:50:14.940 DEBUG Get backup size for selected objects
[43621]: 2018-06-07 10:50:14.940 DEBUG Get backup size for client 'myclient'
[43621]: 2018-06-07 10:50:14.940 DEBUG Client 'myclient': BackupSizeCalculator::getClientSkeletonSize started.
[43621]: 2018-06-07 10:50:14.943 DEBUG Client 'myclient': BackupSizeCalculator::getClientSkeletonSize finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.943 DEBUG Client 'myclient': BackupSizeCalculator::getClientCustomButtonsSize started.
[43621]: 2018-06-07 10:50:14.943 DEBUG Client 'myclient': BackupSizeCalculator::getClientCustomButtonsSize finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.944 DEBUG Get backup size for client 'myclient' finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.944 DEBUG Get backup size for domain 'mydomain.tld'
[43621]: 2018-06-07 10:50:14.944 DEBUG SELECT dbases,mailboxes,maillists,httpdocs,httpsdocs,subdomains,web_users,anonftp FROM disk_usage WHERE dom_id=?
[43621]: 2018-06-07 10:50:14.944 DEBUG Domain 'mydomain.tld': BackupSizeCalculator::getDomainCustomButtonsSize started.
[43621]: 2018-06-07 10:50:14.944 DEBUG Domain 'mydomain.tld': BackupSizeCalculator::getDomainCustomButtonsSize finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.944 DEBUG Get backup size for domain 'mydomain.tld' finished. Size is 3514044416 bytes.
[43621]: 2018-06-07 10:50:14.944 DEBUG Get backup size for client 'myclient2'
[43621]: 2018-06-07 10:50:14.944 DEBUG Client 'myclient2': BackupSizeCalculator::getClientSkeletonSize started.
[43621]: 2018-06-07 10:50:14.944 DEBUG Client 'myclient2': BackupSizeCalculator::getClientSkeletonSize finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.944 DEBUG Client 'myclient2': BackupSizeCalculator::getClientCustomButtonsSize started.
[43621]: 2018-06-07 10:50:14.944 DEBUG Client 'myclient2': BackupSizeCalculator::getClientCustomButtonsSize finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.944 DEBUG Get backup size for client 'myclient2' finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.944 DEBUG Get backup size for domain 'wordpress.mydomain2.tld'
[43621]: 2018-06-07 10:50:14.944 DEBUG SELECT dbases,mailboxes,maillists,httpdocs,httpsdocs,subdomains,web_users,anonftp FROM disk_usage WHERE dom_id=?
[43621]: 2018-06-07 10:50:14.945 DEBUG Domain 'wordpress.mydomain2.tld': BackupSizeCalculator::getDomainCustomButtonsSize started.
[43621]: 2018-06-07 10:50:14.945 DEBUG Domain 'wordpress.mydomain2.tld': BackupSizeCalculator::getDomainCustomButtonsSize finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.945 DEBUG Get backup size for domain 'wordpress.mydomain2.tld' finished. Size is 1229402112 bytes.
[43621]: 2018-06-07 10:50:14.945 DEBUG Get backup size for server settings
[43621]: 2018-06-07 10:50:14.968 DEBUG Retrieve size of '/var/www/vhosts/.skel/0': 329929 bytes
[43621]: 2018-06-07 10:50:14.968 DEBUG Server: BackupSizeCalculator::getServerSettingsKeysSize started.
[43621]: 2018-06-07 10:50:14.968 DEBUG getServerSettingsBackupSize: Load keys from '/etc/sw/keys/keys'
[43621]: 2018-06-07 10:50:14.970 DEBUG Retrieve size of '/etc/sw/keys/keys/keyXXA82TRB': 12268 bytes
[43621]: 2018-06-07 10:50:14.972 DEBUG Retrieve size of '/etc/sw/keys/keys/keyXXZiljhw': 4411 bytes
[43621]: 2018-06-07 10:50:14.972 DEBUG Server: BackupSizeCalculator::getServerSettingsKeysSize finished. Size is 16679 bytes.
[43621]: 2018-06-07 10:50:14.972 DEBUG Server: BackupSizeCalculator::getServerCustomButtonsSize started.
[43621]: 2018-06-07 10:50:14.973 DEBUG Server: BackupSizeCalculator::getServerCustomButtonsSize finished. Size is 0 bytes.
[43621]: 2018-06-07 10:50:14.973 DEBUG Get backup size of server settings finished. Size is 346608 bytes.
[43621]: 2018-06-07 10:50:14.973 DEBUG Get backup size finished. Backup size of selected objects is 4743793136 bytes​

pmmcli.log
[2018-06-07 10:50:11.544|43620] DEBUG: LOG: custom log /var/log/plesk/PMM/backup-2018-06-07-10-50-11-538/backup.log
[2018-06-07 10:50:11.565|43620] INFO: Executing <subprocess[43621] '/usr/bin/perl /opt/psa/admin/bin/plesk_agent_manager server --get-size --incremental --session-path=/opt/psa/PMM/sessions/2018-06-07-105011.546'>
[2018-06-07 10:50:14.989|43620] INFO: Execution of <subprocess[43621] '/usr/bin/perl /opt/psa/admin/bin/plesk_agent_manager server --get-size --incremental --session-path=/opt/psa/PMM/sessions/2018-06-07-105011.546'> finished successful$[2018-06-07 10:50:14.991|43620] INFO: Backup utility reported backup size is 3320655195.2 bytes
[2018-06-07 10:50:14.991|43620] INFO: Backup utility reported backup size is 3320655195.2 bytes
[2018-06-07 10:50:14.991|43620] INFO: PMMcli detected local free disk space is 1682907136 bytes
[2018-06-07 10:50:14.991|43620] DEBUG: <pmmcli.MakeDumpAction object at 0x7f97b7ca8310>: response
[2018-06-07 10:50:14.994|43620] INFO: Outgoing packet:
<?xml version="1.0" ?><response>
<errcode>13</errcode>
<errmsg>Not enough free disk space to backup selected objects. At least 3166.8235733 MBytes free disk space is required.</errmsg>
</response>​
 
It seems that location of DUMP_TMP_D as /mnt/block-storage/plesk_backups_tmp is not taken in account for some reasons. Try to find mentions of this variable in backup logs.
@DenisG could you please assist here?
 
psa.conf:
#
### Copyright 1999-2017. Plesk International GmbH. All Rights Reserved.
#
# This file is used to declare the location of different utilities,
# services, and/or packages within Plesk. No changes should be made
# to this file without first consulting support. Any changes made can
# affect service availability and performance.
#
# Each line in this file follows the following format:
#
# variable [whitespace characters] value
#
# That is, the name of the field, followed by spaces or tabs, followed
# by field value. Trailing spaces are removed.
#

# Plesk tree
PRODUCT_ROOT_D /opt/psa

# Directory of SysV-like Plesk initscripts
PRODUCT_RC_D /etc/init.d

# Directory for config files
PRODUCT_ETC_D /opt/psa/etc

# Directory for service utilities
PLESK_LIBEXEC_DIR /usr/lib/plesk-9.0

# Virtual hosts directory
HTTPD_VHOSTS_D /var/www/vhosts

# Apache configuration files directory
HTTPD_CONF_D /etc/apache2

# Apache include files directory
HTTPD_INCLUDE_D /etc/apache2/conf-enabled

# Apache binary
HTTPD_BIN /usr/sbin/apache2

# Apache log files directory
HTTPD_LOG_D /var/log/apache2

# Apache startup script
HTTPD_SERVICE apache2

# Qmail directory
QMAIL_ROOT_D /var/qmail

# Location of qmail maildirs
PLESK_MAILNAMES_D /var/qmail/mailnames

# Path to rblsmtpd
RBLSMTPD /usr/sbin/rblsmtpd

# Bind
NAMED_RUN_ROOT_D /var/named/run-root



# Webalizer
WEB_STAT /usr/bin/webalizer

# MySQL
MYSQL_VAR_D /var/lib/mysql
MYSQL_BIN_D /usr/bin
MYSQL_SOCKET /var/run/mysqld/mysqld.sock

# PostgreSQL
PGSQL_DATA_D /var/lib/postgresql//main
PGSQL_CONF_D /etc/postgresql//main
PGSQL_BIN_D /usr/lib/postgresql/9.4/bin

# Backups directory
DUMP_D /mnt/block-storage/plesk_backups
# Backups temporary directory. DUMP_TMP_D should not be inside of (or equal to) DUMP_D.
DUMP_TMP_D /mnt/block-storage/plesk_backups_tmp

# Mailman directories
MAILMAN_ROOT_D /usr/lib/mailman
MAILMAN_VAR_D /var/lib/mailman

# Python binary
PYTHON_BIN /usr/bin/python

# DrWeb
DRWEB_ROOT_D /opt/drweb
DRWEB_ETC_D /etc/drweb

# GnuPG binary
GPG_BIN /usr/bin/gpg

# Tar binary
TAR_BIN /bin/tar

# AWStats
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /usr/lib/cgi-bin
AWSTATS_TOOLS_D /usr/share/awstats/tools
AWSTATS_DOC_D /usr/share/awstats

# openssl binary
OPENSSL_BIN /usr/bin/openssl

LIB_SSL_PATH /lib/libssl.so
LIB_CRYPTO_PATH /lib/libcrypto.so

CLIENT_PHP_BIN /opt/psa/bin/php-cli

# SNI
SNI_SUPPORT true

# APS controller
APS_DB_DRIVER_LIBRARY /usr/lib/x86_64-linux-gnu/sw/libmysqlserver.so.2.0

# IPv6 support in backend
IPv6_DISABLED false

# SpamAssassin max mail size (in bytes)
SA_MAX_MAIL_SIZE 256000
CATALINA_HOME /var/lib/tomcat7


I will try to increase the log level and see where the variable DUMP_TMP_D is mentioned, as Igor said. In the current logs, there are no occurences of it.
 
I am sorry but I cannot reproduce the issue. It looks like nothing is mounted at '/mnt/block-storage' and we see free space at '/'.
 
I've double checked the mount point, it's mounted and the user psaadm has read and write permissions

tested it with: (for /mnt/block-storage/plesk_backups and /mnt/block-storage/plesk_backups_tmp)
  • Changed the shell for psaadm from /bin/false to /bin/bash in /etc/passwd
  • su psaadm
  • nano myFile
  • cat myFile
  • undone changes in /etc/passwd

I see now, that mysql backups are made and saved in /mnt/block-storage/plesk_backups
Latest is from this morning

Before I opened this Thread, I upgraded my Plesk instance to 17.8.11. My initial error was already thrown on my previous version , but I hoped it was fixed in the latest relase.

And it seems to me, that Plesk created successfully a backup before the upgrade. In /mnt/block-storage/plesk_backups.

upload_2018-6-13_13-34-43.png
upload_2018-6-13_13-34-12.png
 
Could you run the commands
Code:
/usr/local/psa/bin/python -c "import os,statvfs; stats=os.statvfs('/mnt/block-storage/plesk_backups'); print stats[statvfs.F_BSIZE]*stats[statvfs.F_BAVAIL];"
Code:
df -h
 
:oops:


Code:
42576035840

Code:
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0        28G   25G  898M  97% /
udev             10M     0   10M   0% /dev
tmpfs            98M   13M   85M  14% /run
tmpfs           244M     0  244M   0% /dev/shm
tmpfs           5.0M   24K  5.0M   1% /run/lock
tmpfs           244M     0  244M   0% /sys/fs/cgroup
/dev/sda1       464M   75M  361M  18% /boot
tmpfs            49M     0   49M   0% /run/user/30
/dev/sdb1        59G   17G   40G  30% /mnt/block-storage/archive
tmpfs            49M     0   49M   0% /run/user/0

It is mounted, yes. But it's mounted to /mnt/block-storage/archive and not to /mnt/block-storage. That was my fault that I did not saw.
I changed the moint point to /mnt/block-storage and ran a manual backup job nor errors. Also the scheduled backups are also running perfectly. Thanks!


I'm very thankful for your fast, friendly and helpful support!
 
Back
Top