hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting Talk Tutorials : Programming Tutorials : cPanel FTP backup small fix to latest cPanel version

Forum Jump

cPanel FTP backup small fix to latest cPanel version

Reply Post New Thread In Programming Tutorials Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Join Date: Mar 2004
Location: Bristol, UK
Posts: 13

cPanel FTP backup small fix to latest cPanel version

Hi, I haven't kept track of who are using my little modification for remote FTP backup with friendly folder names. I assume you already know that cPanel moved away from standard perl citaat "cPanel will no longer update Perl modules or install new Perl modules to usr/lib or /usr/local/lib If you have scripts that need to work with cPanel code, we recommend you make the following changes to the top of your Perl scripts. This modification will allow the scripts to work with all cPanel installs"

Anyway, I solved it as follow; insert/replace around row 40 the following.

# Nick - begin rotation configuration
# Convert a time as returned by the time function to a 9-element list with the time analyzed for the local time zone.
# Typically used as follows 0 1 2 3 4 5 6 7 8
#($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
# declare the variables and call the function.
my $sec; my $min; my $hour; my $mday; my $mon; my $year; my $wday; my $yday; my$isdst;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
my @abbrmonth = qw( January February March April May June July August September October November December );
my @abbrweekday = qw( Sunday Monday Tuesday Wednesday Thursday Friday Saturday );
# declare our new folder names.
my $dayOfWeek;
my $nameOfMonth;
my $dayOfWeek = $abbrweekday[$wday];
my $nameOfMonth = $abbrmonth[$mon];
print "Today is: " . $dayOfWeek . " in the month: " . $nameOfMonth;
print "\n";
# Nick - end rotation configuration

Now rows are moved a little in my cpbackup file it is now row 922
This is the FTP upload section.

Replace/insert with

# Nick - begin rotation configuration
if ($backtype eq 'daily')
elsif ($backtype eq 'weekly')
elsif ($backtype eq 'monthly')
# Nick - end of rotation configuration

When modified upload and protect the file for overwriting.
chattr +i /usr/local/cpanel/scripts/cpbackup


Sponsored Links

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solution] Fix vulnerable wordpress site & upgrade it to the latest version Mxhub Hosting Security and Technology 4 09-07-2009 11:43 PM
Upgrade to Latest Version Cpanel ! ERROR binh_mos Hosting Security and Technology 1 07-24-2006 05:14 AM
Cpanel: Finding latest stable version shasta Hosting Software and Control Panels 2 07-01-2006 06:30 PM
is this latest version of cPanel? Kongyang Hosting Software and Control Panels 3 12-06-2005 06:06 PM
Latest version of CPanel? cortices Hosting Software and Control Panels 1 03-12-2003 10:18 PM

Related posts from
Title Type Date Posted
Website Backup Provider CodeGuard Releases cPanel, WHMCS Plugins Web Hosting News 2015-02-24 14:02:52
IT Monitoring Solution Anturis Adds Parallels Plesk Integration Web Hosting News 2014-02-26 09:58:52
What's New at cPanel: IPv6 and 1:1 NAT Support Web Hosting News 2013-10-01 18:12:07
Barracuda Network Releases Version 5.4 of Cloud Backup Solution Web Hosting News 2013-08-26 12:18:47
cPanel & WHM Software 11.36 Reaches Stable Tier Status Web Hosting News 2013-04-09 11:44:33

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?