Ftp backups created in /home/tmp to include pid in path

Version 1.49

Bugfix
Finished

Previously, backup files uploaded with ftp would be assembled in temporary locations, eg: /home/tmp/admin/username The issue with that would be if you had created multiple backup crons that were running at the same time, the start of the 2nd would clean it's work area (/home/tmp/admin) before starting, likely wiping out all data of the other backup cron. Because FTP backups can be to different locations, this should be allowed, so the fix is to make the path: /home/tmp/admin.1234/username where .1234 will be added to the path, where 1234 is the PID of the current dataskq process. IMPORTANT: if you have any custom scripts in: /usr/local/directadmin/scripts/custom/*.sh that relate to backups or filenames, be sure to update them to account for the PID in the backup creator's name. If you don't want to touch your scripts, you can shut off this feature to back to the old way of the conflicting paths. The default internal directadmin.conf setting will be: backup_tmp_path_has_pid=1 so if you want to disable the functionality, set: backup_tmp_path_has_pid=0 NOTE: Local backups will not receive this behavior for two reasons: 1) The path will not be cleaned, so we don't want /home/admin/admin_backups.1234 for each created backup, it should overwrite the previous files. 2) If you have two backups running at the same time, writing to the same file, you might want to re-asses your cron schedule.

Interested to try DirectAdmin? Get a 30-day Free Trial!