• 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

Problem to backup server config

NaSOnWeb

Basic Pleskian
hello,

i'm on plesk 12.0.18 and i would like to backup my server config. I have an error
Logging::error('Available disk space () is less than required by storage bund...', 'fatal') called at /opt/psa/PMM/agents/shared/Storage/Storage.pm line 523

(you can see this post for history... http://talk.plesk.com/threads/update-parallels-panel-11-5-3-to-12-0-18-how-to.324480/ )


the function un cat /usr/local/psa/PMM/agents/shared/HelpFuncs.pm is like that


Code:
sub getMountSpace {
my $mount = shift;
my $df = qx( df -P -k $mount) or die $!;
while ( $df =~ /^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+\%)\s+(\S+)$/gm ) {
return (1024 * $2, 1024 * $4, $6);
}
return;
}

and in /opt/psa/PMM/agents/shared/Storage/Storage.pm

Code:
sub reserveSpace {
my ($self ) = @_;
if (exists $self->{space_reserved} ) {
my $avail = (HelpFuncs::getMountSpace($self->getFullOutputPath()))[1];
if( $avail < $self->{space_reserved} ) {
my $errmsg = "Available disk space ($avail) is less than required by storage bundle ($self->{space_reserved})";
Logging::error($errmsg,'fatal');
print STDERR "$errmsg\n";
exit(2);
}
my $namebase = $self->getFullOutputPath().'/.fs_'.(0+$self).'_';
my $var = 0;
while( -e "$namebase$var.tmp"){$var++;}
$self->{space_reserver} = "$namebase$var";
Logging::debug("Reserve disk space at $self->{space_reserver}");
qx( dd if=/dev/zero of=$self->{space_reserver} bs=$self->{space_reserved} count=1);
}
}

but the problem still persist :'(

in shell when I do df -P -kit seems to work

Code:
root@xxx:~# df -P -k
Filesystem Size Used Avail Use% Mounted on
rootfs 20G 2.2G 17G 12% /
/dev/root 20G 2.2G 17G 12% /
/dev 7.9G 168K 7.9G 1% /dev
none 7.9G 0 7.9G 0% /dev/shm
none 7.9G 624K 7.9G 1% /var/run
none 7.9G 0 7.9G 0% /var/lock
none 7.9G 0 7.9G 0% /lib/init/rw
/dev/md2 1.8T 1.1T 677G 62% /var
none 7.9G 624K 7.9G 1% /var/run
none 7.9G 0 7.9G 0% /var/lock

do you have an idea ?
i've unchecked the disk space verification in backup settings with no more results ...

is it a way to launch the function reserveSpace and/or getMountSpace helper in shell ? to see the returned value ?

or can i launch /usr/local/psa/bin/pleskbackup server -c comand line to backup only the config ?
thanks
thanks
 
Last edited:
hello
here is the result of


Code:
root@xxx:~# /usr/local/psa/bin/pleskbackup server -c -vvvvv
[31801]: 2015-06-12 09:26:14 INFO c0d415da-20a0-4b6a-897a-571b8880b7be Create backup task description
[31801]: 2015-06-12 09:26:14 INFO 9146d76f-8911-43ab-857b-32d77cfbc75a Create task for backup
[31801]: 2015-06-12 09:26:14 DEBUG Task data: <?xml version="1.0" encoding="UTF-8"?>
  <backup-task-description>
  <misc verbose-level="5" owner-type="server" owner-guid="00000000-0000-0000-0000-000000000000"/>
  <dumps-storage-credentials storage-type="local">
  <root-dir>/var/lib/psa/dumps</root-dir>
  </dumps-storage-credentials>
  <backup-specification>
  <backup-options type="configuration-only"/>
  <object-to-backup type="server"/>
  </backup-specification>
  </backup-task-description>

[31801]: 2015-06-12 09:26:14 DEBUG The make dump task is executed with errorcode '0'
[31801]: 2015-06-12 09:26:14 DEBUG The pmmcli output:<?xml version="1.0" encoding="UTF-8"?>
<response>
  <errcode>0</errcode>
  <data>
  <task-id>31803</task-id>
  </data>
</response>

[31801]: 2015-06-12 09:26:14 DEBUG The task with id '31803' have been created
[31801]: 2015-06-12 09:26:14 INFO 9084209f-24be-4de7-8486-bde8faff4b15 Backup started
[31801]: 2015-06-12 09:26:15 DEBUG Execute: /opt/psa/admin/bin/pmmcli --get-task-status 31803
[31801]: 2015-06-12 09:26:15 DEBUG The get task status is executed with errorcode '0'
[31801]: 2015-06-12 09:26:15 DEBUG The pmmcli output:<?xml version="1.0" encoding="UTF-8"?>
<response>
  <errcode>0</errcode>
  <data>
  <task-status task-id="31803">
  <finished status="error" log-location="/opt/psa/PMM/sessions/2015-06-12-112614.380/migration.result">
</finished>
  </task-status>
  </data>
</response>

[31801]: 2015-06-12 09:26:15 DEBUG Finished: status 'error', logs '/opt/psa/PMM/sessions/2015-06-12-112614.380/migration.result'
-------------- Start print backup log hire --------------
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <errcode>0</errcode>
  <data>
  <task-log>[31803]: 2015-06-12 09:26:14 DEBUG ------------------------------------------------------------
[31803]: 2015-06-12 09:26:14 DEBUG Migration status reporting initialized.
[31803]: 2015-06-12 09:26:14 DEBUG Status file: /opt/psa/PMM/sessions/2015-06-12-112614.380/dump-status.xml
[31803]: 2015-06-12 09:26:14 DEBUG ------------------------------------------------------------
[31803]: 2015-06-12 09:26:14 DEBUG ------------------------------------------------------------
[31803]: 2015-06-12 09:26:14 DEBUG FILE storage initialized.
[31803]: 2015-06-12 09:26:14 DEBUG Base directory: /var/lib/psa/dumps
[31803]: 2015-06-12 09:26:14 DEBUG Space reserved: 31457280
[31803]: 2015-06-12 09:26:14 DEBUG Gzip bundles: yes
[31803]: 2015-06-12 09:26:14 DEBUG Bundle split size: do not split
[31803]: 2015-06-12 09:26:14 DEBUG ------------------------------------------------------------
[31803]: 2015-06-12 09:26:14 ERROR e1ee5a43-29bf-4a26-872a-b2e6b2d1d190 Available disk space () is less than required by storage bundle (31457280):
 at /opt/psa/PMM/agents/shared/Logging.pm line 100
  Logging::error('Available disk space () is less than required by storage bund...', 'fatal') called at /opt/psa/PMM/agents/shared/Storage/Storage.pm line 523
  Storage::Storage::reserveSpace('Storage::FileStorage=HASH(0x1e08718)') called at /opt/psa/PMM/agents/shared/Storage/FileStorage.pm line 45
  Storage::FileStorage::_init('Storage::FileStorage=HASH(0x1e08718)', 'gzip_bundle', 1, 'output_dir', '/var/lib/psa/dumps', 'split_size', undef, 'sign', 1, ...) called at /opt/psa/PMM/agents/shared/Storage/Storage.pm line 22
  Storage::Storage::new('Storage::FileStorage', 'gzip_bundle', 1, 'output_dir', '/var/lib/psa/dumps', 'split_size', undef, 'sign', 1, ...) called at /opt/psa/PMM/agents/shared/Storage/Storage.pm line 177
  Storage::Storage::createFileStorage(1, '/var/lib/psa/dumps', undef, 1, 31457280, undef) called at /opt/psa/admin/bin/plesk_agent_manager line 541
  main::perform('verbose', 4, 'owner-type', 'server', 'split-size', undef, 'session-path', '/opt/psa/PMM/sessions/2015-06-12-112614.380', 'all', ...) called at /opt/psa/admin/bin/plesk_agent_manager line 1117
  main::__ANON__() called at /usr/share/perl5/Error.pm line 416
  eval {...} called at /usr/share/perl5/Error.pm line 408
  Error::subs::try('CODE(0x1dfb9e8)', 'HASH(0x1dfbd18)') called at /opt/psa/admin/bin/plesk_agent_manager line 1125
  main::main() called at /opt/psa/admin/bin/plesk_agent_manager line 1129


== STDERR ====================
Available disk space () is less than required by storage bundle (31457280)

==============================
</task-log>
  </data>
</response>
-------------- End print backup log hire --------------

You can view additional information in the log file located in /opt/psa/PMM/sessions/2015-06-12-112614.380/migration.result directory. This directory will be removed automatically after 30 days

Runtime error: The backup failed with errors!

just a question
31457280 value are octets ? bits ?
this is huge for only a config backup no ?

thanks
 
Try to change line

my $df = qx( df -P -k $mount) or die $!;

to

my $df = qx( df -k $mount) or die $!;

in file HelpFuncs.pm and check how it goes on.
 
@NaSOnWeb,

A quick summary (correct me, if I am mistaken):

a) you want to make a backup of (only) server settings,

b) that gives disk space errors,

c) you have

Filesystem Size Used Avail Use% Mounted on
rootfs 20G 2.2G 17G 12% /
/dev/root 20G 2.2G 17G 12% /
/dev 7.9G 168K 7.9G 1% /dev
none 7.9G 0 7.9G 0% /dev/shm
none 7.9G 624K 7.9G 1% /var/run
none 7.9G 0 7.9G 0% /var/lock
none 7.9G 0 7.9G 0% /lib/init/rw
/dev/md2 1.8T 1.1T 677G 62% /var
none 7.9G 624K 7.9G 1% /var/run
none 7.9G 0 7.9G 0% /var/lock

and the question now is wether the work-around, suggested by IgorG, is working.

Is it?

Note disk space errors should not be logged when using the work-around suggested by IgorG, but that does not imply that disk space errors are absent.

More important, note that disk space errors can be present due to many factors, amongst others being

- errors in file system setup,
- errors in mounts,
- fstab configuration errors,
- factual shortage of disk space,
- plesk storing backups in a custom location, specified in the /etc/psa/psa.conf file (or similar config files)

and so on.

Plesk will use /var/lib/psa/dumps and /tmp as backup directories (if the backup location settings are not changed).

In short, the backup process is pointing to rootfs filesystem (/tmp) AND /dev/md2 filesystem (/var/lib/psa/dumps).

It is very likely that the "disk space check" is resulting in errors, since you do not have sufficient space on the rootfs filesystem.

I would suggest that you

1) create the directory /var/tmp (residing on the /dev/md2 filesystem)

2) change the value of DUMP_TMP_D in /etc/psa/psa.conf to /var/tmp

3) restart psa with the command: service psa restart (not really necessary, you can skip this, if desired)

4) optional - cleanup /var/lib/psa/dumps

and that should do the trick.

Note that your entire disk setup is, in a sense, strange and, as a result, you would have to "hack" the psa.conf file.

It is adviceable to test the backup process with the "psa.conf hack" and, afterwards, to create a separate /tmp mount on /dev/md2, with enough disk space (50Gb or more), in order to prevent that future updates of the Plesk Panel will undo the changes to the psa.conf file.

Kind regards.....
 
Hi Guys ... yes I Know, we are two years later .. lol
i've tried your suggestions
@IgorG ... nothing change :'(
@trialotto always the same error : Not enough free disk space to perform operation. Available disk space () is less than required by storage bundle (31457280) Resolution: Free up disk space and run backup again :'(
 
Back
Top