• 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

Issue Backup to ftp: file changed as we read it

kiav

Basic Pleskian
In Plesk I see:
Unable to upload dump to FTP, it remains in server repository and you can manually download and upload it to FTP. Upload diagnostic message: Repository error: Unable to pack /opt/tmp/repo_transport_tmp_MpTroa/: /bin/tar: domains/example.com/backup_user-data_1609090210.tgz: file changed as we read it

In /var/log/plesk/PMM/backup-2016-09-09-02-10-02-143/backup.log file:
[2016-09-09 03:24:42.360|20479] INFO: Link /opt/tmp/dump.hdr.5PsQeg to /opt/tmp/repo_transport_tmp_MpTroa/dump-header
[2016-09-09 03:24:42.361|20479] INFO: Link /opt/tmp/dump.idx.Qixo3d to /opt/tmp/repo_transport_tmp_MpTroa/dump-index
[2016-09-09 03:24:42.361|20479] INFO: Repository 'ftp://10.10.10.10//plesk/': Pack backup_fail2ban_1609090210.tgz, backup_skel_1609090210.tgz, backup_dd_conf_1609090210.tgz, .discovered/backup_info_1609090210, domains/dev.example.com/databases/maindb_n_forumz_dev_1/backup_1609090210.tgz, domains/dev.example.com/databases/admin_forum_0208_1/backup_1609090210.tgz, domains/dev.example.com/databases/forum_new_dev_1/backup_1609090210.tgz, domains/dev.example.com/backup_conf_1609090210.tgz, domains/dev.example.com/backup_pd_1609090210.tgz, domains/dev.example.com/backup_user-data_1609090210.tgz, domains/dev.example.com/.discovered/backup_info_1609090210, domains/dev.example.com/backup_statistics_1609090210.tgz, domains/dev.example.com/backup_apache-files_1609090210.tgz, domains/dev.example.com/backup_logs_1609090210.tgz, domains/dev.example.com/backup_info_1609090210.xml, domains/example.com/backup_mn_1609090210.tgz, domains/example.com/databases/maindb_rel_1/backup_1609090210.tgz, domains/example.com/databases/maindb_forum_rel_1/backup_1609090210.tgz, domains/example.com/backup_conf_1609090210.tgz, domains/example.com/backup_pd_1609090210.tgz, domains/example.com/backup_user-data_1609090210.tgz, domains/example.com/.discovered/backup_info_1609090210, domains/example.com/backup_statistics_1609090210.tgz, domains/example.com/backup_apache-files_1609090210.tgz, domains/example.com/backup_logs_1609090210.tgz, domains/example.com/backup_info_1609090210.xml, domains/design.example.com/databases/design_1/backup_1609090210.tgz, domains/design.example.com/backup_conf_1609090210.tgz, domains/design.example.com/backup_pd_1609090210.tgz, domains/design.example.com/backup_user-data_1609090210.tgz, domains/design.example.com/.discovered/backup_info_1609090210, domains/design.example.com/backup_statistics_1609090210.tgz, domains/design.example.com/backup_apache-files_1609090210.tgz, domains/design.example.com/backup_logs_1609090210.tgz, domains/design.example.com/backup_info_1609090210.xml, backup_file_sharing_1609090210.tgz, backup_info_1609090210.xml, backup_keyXXloGl3D.key_1609090210.tgz from /opt/tmp/repo_transport_tmp_MpTroa/ to /backup_1609090210.tar. Additional files count: 2. Split size: -1
[2016-09-09 03:24:42.361|20479] INFO: ENV[LANG]=en_US.UTF-8
[2016-09-09 03:24:42.361|20479] INFO: Executing utility: /bin/sh -c -e /bin/tar\ --create\ --file\ -\ --directory\ \'/opt/tmp/repo_transport_tmp_MpTroa/\'\ --dereference\ --files-from\ \'/opt/tmp/repo_transport_tmp_mYwqqi\'
[2016-09-09 03:24:42.367|20479] INFO: Ftp init url ftp://10.10.10.10//plesk/backup_1609090210.tar
[2016-09-09 04:14:56.459|20479] INFO: The utility executed with the return code: 1
[2016-09-09 04:14:56.610|20479] INFO: pmm-ras finished. Exit code: 1
[17788]: 2016-09-09 04:14:56.612 ERROR 55239124-067d-4573-8294-b364070d7aeb Unable to upload dump to FTP, it remains in server repository and you can manually download and upload it to FTP. Upload diagnostic message: Repository error: Unable to pack /opt/tmp/repo_transport_tmp_MpTroa/:/bin/tar: domains/example.com/backup_user-data_1609090210.tgz: file changed as we read it

I had to change /tmp to /opt/tmp before (/tmp is too small). But it does not help. I have no any idea to resolve my problem.

Backups are succesfully creating into local storage. But with FTP I faced this trouble.
 
Go through the checklist from KB article https://kb.plesk.com/en/124518
Remote FTP is accessible:
[root@example ~]# ftp 10.10.10.10
Connected to 10.10.10.10 (10.10.10.10).
220 (vsFTPd 2.2.2)
Name (10.10.10.10:root): user
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd plesk
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (93,170,130,60,73,75).
150 Here comes the directory listing.
drwxr-xr-x 2 500 500 4096 Sep 06 17:10 check0
226 Directory send OK.
ftp> put install.log
local: install.log remote: install.log
227 Entering Passive Mode (93,170,130,60,215,58).
150 Ok to send data.
226 Transfer complete.
9545 bytes sent in 4,3e-05 secs (221976,75 Kbytes/sec)
ftp> ls
227 Entering Passive Mode (93,170,130,60,173,94).
150 Here comes the directory listing.
drwxr-xr-x 2 500 500 4096 Sep 06 17:10 check0
-rw-r--r-- 1 500 500 9545 Sep 09 08:33 install.log
226 Directory send OK.
ftp> delete install.log
250 Delete operation successful.
ftp> ls
227 Entering Passive Mode (93,170,130,60,238,36).
150 Here comes the directory listing.
drwxr-xr-x 2 500 500 4096 Sep 06 17:10 check0
226 Directory send OK.
ftp> exit
221 Goodbye.

Of cause I replaced real IP and user login in the log.
 
What is output of

# df -h

on your server?

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 451G 150G 278G 36% /
tmpfs 9,8G 0 9,8G 0% /dev/shm
/dev/sda1 190M 35M 146M 20% /boot
/dev/sdb1 917G 390G 482G 45% /opt
tmpfs 4,0G 329M 3,7G 9% /tmp
tmpfs 512M 0 512M 0% /var/lib/php/session
tmpfs 1,0G 2,9M 1022M 1% /var/www/vhosts/example.com/httpdocs/bitrix/cache
tmpfs 512M 2,1M 510M 1% /var/www/vhosts/example.com/httpdocs/bitrix/managed_cache
tmpfs 256M 0 256M 0% /var/www/vhosts/example.com/httpdocs/bitrix/stack_cache

Local storage is on /opt/backups/plesk.
Full backup size in 120GB, differential - 2-7GB.
 
I hope that all your changes are reflected in the output of

# grep DUMP /etc/psa/psa.conf

Try also create a symlink from folder '/usr/local/psa/PMM/' to folder which has a lot free disk space '/opt/tmp/' . You can use the following command for this purpose

# ln -s /opt/tmp/ /usr/local/psa/PMM/
 
I hope that all your changes are reflected in the output of

# grep DUMP /etc/psa/psa.conf
$ grep DUMP /etc/psa/psa.conf
DUMP_D /opt/backups/plesk
DUMP_TMP_D /opt/tmp


Try also create a symlink from folder '/usr/local/psa/PMM/' to folder which has a lot free disk space '/opt/tmp/' . You can use the following command for this purpose

# ln -s /opt/tmp/ /usr/local/psa/PMM/
I had to bind-mount the corresponding directories, as told in https://kb.plesk.com/en/114415
Their said "Remove any symlinks for these folders as they will not work."

So:
# mount | grep psa
/opt/psa_tmp on /usr/local/psa/tmp type none (rw,bind)
/opt/psa_pmm_tmp on /usr/local/psa/PMM/tmp type none (rw,bind)

But it does not help. The error "file changed as we read it" is still here.

Additionally I faced with a warning:
Not all the data was backed up into /opt/backups/plesk/domains/example.com successfully.
/bin/tar: httpdocs/folder1/folder2/0188954a51aef611aab799407bd03adb.php: Cannot stat: No such file or directory
/bin/tar: httpdocs/folder1/folder2/169b9753cca5b27da06825f04f625a09.php: Cannot stat: No such file or directory
/bin/tar: Exiting with failure status due to previous errors

0188954a51aef611aab799407bd03adb.php and similar are temporary files.

Do I need to stop all subscriptions before making planned backup?

Updated: I already tested "Suspend domains until the backup task is completed" setting. Enabling it does not resolve "file changed as we read it" error.
 
Last edited:
Same problem here! Full backup fails while incremental backup is working. Error is also "file changed as we read it" for "user-data" part.
It even occurs for a single site which has about 1.7 GB data and 1 GB emails...
(Of course "Suspend domains until the backup task is completed" setting is turned on!)
 
Code:
Not all the data was backed up into /opt/backups/plesk/domains/example.com successfully.
/bin/tar: httpdocs/folder1/folder2/0188954a51aef611aab799407bd03adb.php: Cannot stat: No such file or directory
/bin/tar: httpdocs/folder1/folder2/169b9753cca5b27da06825f04f625a09.php: Cannot stat: No such file or directory
/bin/tar: Exiting with failure status due to previous errors
0188954a51aef611aab799407bd03adb.php and similar are temporary files.

Not part of the issue. This (only the one specific error shown above, not the error described in your initial post) is actually a normal, correct behavior and can be ignored.
 
Back
Top