How to manually initiate nightly backup from the command line?

C

cPanelBilly

Guest
There is no way easy to do this, best would probably be to just rsync the files (or ftp them if you prefer)
 

livewebcs

Member
PartnerNOC
Jun 11, 2004
11
0
151
How to manually initiate nightly backup from the command line?

Is there a way from the command line to run the nightly backup of CPANEL and specify an FTP source?

We backup nightly to hard disk but I would like to also backup to FTP to a second source every once and a while.

Thus I am looking for a solution where I can run a second backup run (to FTP) every once and a while.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
You could have a secondary cpbackup.conf file with the FTP details in it. ONce you have that, create a shell script that:

1. Renames the real cpbackup conf file
2. Puts the FTP cpbackup conf file in place
3. Executes /scritps/cpbackup --force (without --force the backup might fail with 'Backup is already up to date').
4. Once the backups complete (will have to monitor processes for this), undo steps 2 and 1

You could then execute the shell script manually.