Date in the file name created by cpbackup

ne-miguelito

Registered
Sep 5, 2012
1
0
1
cPanel Access Level
Website Owner
Hello,

Is it possible to put the date in the backup file?

The cpbackup run every day and send backups to a remote FTP server, with the name "user.tar.gz", it is possible change the name to "user.YYYY.MM.DD.tar.gz"?

I believe that the code responsible for this in cpbackup is:

Code:
(...)
my $target_file = ( $CONF{'COMPRESSACCTS'} eq 'no' ? "$user.tar" : "$user.tar.gz" );
(...)
any suggestions?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
You could simply have a cron on the remote FTP server set to change the name after it finishes backing up. Changing the code in cpbackup will only work if you don't end up having the code updated. We frequently make changes to the backup process itself and I wouldn't advise modifying the code in any way.

You may well want to check for any possible existing Feature Request on the forum, and if one doesn't exist, submit a new one at Feature Requests for cPanel & WHM