• 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

Sheduled backup to remote ftp, anyone?

G

Griffith

Guest
Anyone got this working..?

Run a scheduled backup and the transfer it to a ftp.. I haven't got it startet at all...

Tried a manual backup to ftp server.. but got this error:
error: cURL execution failed: the username and/or the password are incorrect


Ideas?

Running psa-7.5.4 - Centos-3.5
 
Old Script that works

The following script works for a basic backup using psadump (Plesk 7.5.4r Fedora 2). Included is the link to the original forum post.

There are newer scripts and apps available, but this will work.

Code:
#!/bin/sh
# SW-Soft Forum location for this script.
# [url]http://forum.sw-soft.com/showthread.php?threadid=6065&perpage=15&highlight=Mega%202000%20AS&pagenumber=2[/url]
# Simple script written by Mega 2000 AS. Feel free to use and modify it on your own risk and responsibility

# Setting variables

# Setting date to name the backupfile with todays date
date=`/bin/date "+%Y%m%d"`

# Your username on the ftp server
username="FTP_USERNAME"

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

# FTP servers adress
ftpserver="HOSTNAME_OR_IP"

# Local directory where the backupfiles will be teporarily placed
backupdir="/LOCAL_BACKUP_DIRECTORY"

# You do not need to change anything below this line

# Running Plesk backupscript. Use line with the command nostop is not recommended and are not disabling webservices
# as long the psadump is running. If preferedd comment in an # before that line an uncomment the next line and
# the backup will run with apache, psa and qmail stopped on the server. That is the recommended mode.

/usr/local/psa/bin/psadump -F -f $backupdir/dump$date.YOUR_EXTENSION_IF_ANY

# Changing to dump directory

cd $backupdir

# Transfering files to your backupserver

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

# Remove backupfiles from the Plesk server

# Directory Name
cd /LOCATION_OF_PSADUMP_LOG_FILE
cat psadump* | mail -s "Server Backup Stats from YOUR_SERVERNAME for dump$date.svr" [email][email protected][/email]
rm -rf psadump*

# Removes local copy of backup
cd $backupdir
rm *.YOUR_EXTENSION_IF_ANY

#Done

BE SURE the file is chown, chmod:

-rwxr-xr-x 1 root.root

and located in your /usr/bin if running as a cronjob.
 
I mean for customers via CP. Have made my own script for backup.. but was thing for customers in CP :p
 
??

I'm running 7.5.4r Fedora 2 so unsure if your setup is the same, but if so you can set the FTP account access via Clients | Domains.

The client can then create manual/scheduled backups either local and/or FTP backups using your FTP login information.

P7.5.4r/FC2/Linux doesn't allow us to perform full backups. (only individual client backups via C.P.)

See:

http://forum.sw-soft.com/showthread.php?threadid=26673

to explain how to restrict clients from changing and/or accessing other FTP backup data on your FTP server.

Hope this is more help.
 
I don't quite understand what you mean by restricting the clients for accessing the ftp info...? I may have completely misunderstood you, and I'm not even sure which icon you say that should be "hidden" from clients...

The way I understand the ftp in the clients backup area.. is ment so that the client can move backups to other ftp servers.. not a common one that you have for all you clients...? Did I missunderstand you ? :D
 
First question: Are you looking for a way to backup your server, or a way for clients to backup their data to an FTP server, whether yours or one of their own?

Since you said you have a script, I take it you already have a way to do the server backup.

If you are looking for a way to schedule and/or allow clients to schedule backups they can do so by going to their C.P.:
Code:
Domain | Backup | Create Backup
If you allow FTP backups, they can use:
Code:
Domain | Backup | FTP Account Properties
to setup an FTP backup.

However, if you provide backup space for your clients on an FTP server, you will first need to setup your FTP server information in each domain account.

Once you have setup the FTP information, (host, path, username, password) in each domain, you can then go to:
Code:
Server | Interface Management
and check the Show Interface Management Toolbar.

Once checked, you'll see a button in the lower left part of your screen "Customize"

Go to a client domain and click on the Customize button. To prevent clients from using any one or more buttons, you can click on each icon and set them to
Code:
Hide | Admin Only | Show | Default
By choosing Admin Only, the client will not have the option to use that function.

This way, you can set a common FTP backup server configuration while preventing clients from having access to the root of your FTP server or any other client data stored there.

If this is far and above what you want, the client only needs to go to
Code:
Domain | Backup | FTP Account Properties
to setup their own FTP backup.

Once setup, they can then use the Scheduled Backup Settings to set their backup schedules.

Hope I've not confused you further.

LMK

>>L
 
Back
Top