moogle

Well-Known Member
Apr 7, 2003
94
0
156
Hi, I'm having a brain fart. I can't remember for the life of me.
What's the command to make a backup in SSH?

Thanks.
 

moogle

Well-Known Member
Apr 7, 2003
94
0
156
Typo..
/scripts/pkgacct USERNAME

For some reason I was thinking /scripts/backup but that felt too simple.
 

moogle

Well-Known Member
Apr 7, 2003
94
0
156
Hey, I found this is backing up the account in the /home calling it cpmove-user.tar.gz
I'm looking to make it actually back it up, in the /backup/cpbackup folder.
 

Messiah

Member
PartnerNOC
Jul 5, 2006
22
0
151
If you want to force backups to run, then run /scripts/cpbackup. Keep in mind, this script will only run daily backups if the current daily backup is >=24 hours old, and weekly if the current is >= 7 days old, etc. If you delete the current daily backup for the domain in /backup/cpbackup/daily/, then run /scripts/cpbackup, it will create a new backup file.
 

sparek-3

Well-Known Member
Aug 10, 2002
1,929
180
343
cPanel Access Level
Root Administrator
moogle said:
Hey, I found this is backing up the account in the /home calling it cpmove-user.tar.gz
I'm looking to make it actually back it up, in the /backup/cpbackup folder.
Run:

/scripts/pkgacct <username> <location> backup

<username> refers to the username you want to backup.

<location> is the path to where the backup will be placed (in your case you want to put /backup/cpbackup here).

backup tells pkgacct that you want to create a backup file. If you leave this off it creates a cpmove archive. Not sure what the difference is between a cpmove and a backup file, but this tells pkgacct you just want to create a <username>.tar.gz file in <location>.
 

freedman

Well-Known Member
Feb 13, 2005
312
1
168
moogle said:
Hey, I found this is backing up the account in the /home calling it cpmove-user.tar.gz
I'm looking to make it actually back it up, in the /backup/cpbackup folder.
if cpbackup has been run already and set up /backup/cpbackup tree, then I use the following script periodically to freshen the user files.

Note this doesn't update the sql backup, but at least the homedir is up to date (with fresh emails, etc.).. this works for me since most of my clients db usually update on regular intervals and is read the rest of the time.

#!/bin/sh
date
cd /var/cpanel/users
for i in *; do echo $i `date`; rsync -rlptDuS --del /home/$i/ /backup/cpbackup/weekly/$i/homedir/; done
date


I suppose it wouldn't be too difficult to add a line in to backup the databases as well, I've just not bothered.