Cron Job to backup one site

rasilva

Member
Mar 18, 2003
17
0
151
Hello,

Can anyone tell me if it's possible to create a cron job that backups one site (just one not the whole server) to the home directory of the account.

This may sound strange but i need it to be accessible, via FTP, so a system i have in my office can go there and download it to my local server (installed at the office) once a day.

As it is now, i can only download files.... that's why i would like to create a full backup (just like the ones cpanel does with mail, databases, files etc...).

Thanks in advance. :)
 

beehave

Well-Known Member
Jun 26, 2005
104
0
166
This script SHOULD do what you want. It uses /scripts/pkgacct to pack up account and then moves the gz file into the home directory of the account.

Code:
#!/bin/bash

user='USERNAME'

/scripts/pkgacct $user

mv -f /home/cpmove-$user.tar.gz /home/$user/$user.tar.gz

exit
 

ekhwan

Active Member
Aug 12, 2006
33
0
156
This script SHOULD do what you want. It uses /scripts/pkgacct to pack up account and then moves the gz file into the home directory of the account.

Code:
#!/bin/bash

user='USERNAME'

/scripts/pkgacct $user

mv -f /home/cpmove-$user.tar.gz /home/$user/$user.tar.gz

exit
Is it Possible to add a cronjob without shell access, if yes how can this be done?