• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

full server backup.....question?

P

ppc

Guest
I use the cron that creates a full server backup to a specific folder. I labeled it plesk backup. However, it seems that plesk is just making one big file instead of breaking up the backup and creating a new file from day to day.

Is there anyway to change that?


thanks

ppc123
 
First, I assume you are using the pleskbackup to make the backup. You can use the script below to make the backup filename show the date.

# Full backup of system
date=`/bin/date +%F`
/usr/local/psa/bin/pleskbackup --all /backupdirectory/fullbackup_$date

#then use this part of the script to ftp the backup file to a new location
# Your username on the ftp server
username="username"

# Your password on the ftp server
passwd="password"

# FTP servers adress
ftpserver="ip address"

# Local directory where the backupfiles will be temporarily placed

backupdir="/backupdirectory"


# Changing to dump directory

cd $backupdir

# Transfering files to your backupserver

ftp -n $ftpserver <<!EOF!
user $username $passwd
binary
prompt
mput *
quit
!EOF!

By the way, if this is the command you are using, you are NOT getting a full system backup of the OS, just a full backup of Plesk, mysql databases, clients and domains and everything related to Plesk.
 
Originally posted by jwdick
/usr/local/psa/bin/pleskbackup --all /backupdirectory/fullbackup_$date


Thanks!

I'm a newbee so can you clarify this:

I currently use the cron of pleskbackup, it looks like this:

/usr/local/psa/bin/pleskbackup all /backup/pleskbackup

Is there a way to just add something to this cron to make it make a seperate file every day i run the cron with the date?

That script that you gave me, do i have to make it a file? I'm not using FTP though; can I just use the cron command that you gave there:

/usr/local/psa/bin/pleskbackup --all /backupdirectory/fullbackup_$date

and if so will that make a new file every time the cron is run?

thanks again!
 
Do you have SSH priviledges on the server? If yes, then log into the server, make a file called fullbackup and place these lines in the file:

# Full backup of system
date=`/bin/date +%F`
/usr/local/psa/bin/pleskbackup --all /backup/pleskbackup/fullbackup_$date

Then change your cron job to run the fullbackup file just created.

I do not know of another way of adding the "date" variable.
 
thanks :)

Can i just setup the command in the cron settings in plesk for this:

/backup/fullbackup (thats where its located)

If I SSH in and run it("/backup/fullbackup"), it works fine but the cron did not do anything...

also, how would i view the contents of the file...

thanks again
 
Can i just setup the command in the cron settings in plesk for this:

/backup/fullbackup (thats where its located)

Sure, set the cron to run the file /backup/fullbackup

If it runs from the command line (via ssh) then the script works. If the cron job does not do anything, it has to be a problem with the way you have the cron job scheduled or with permissions.
 
Viewing the contents of the file is not so easy. I downloaded the backup file to my local machine, then upzipped it. Some of it is readable, some is mime and not readable unless you rip it. In the last day or so, I have read on this forum that there is a command to lsit the file names in the backup file but I do not remember what the utility is called, nor have I been success in findintg the thread that mentioned this utility. Maybe someone else can help here.
 
Back
Top