1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Sheduled backup to remote ftp, anyone?

Discussion in 'Plesk for Linux - 8.x and Older' started by Griffith, Aug 26, 2005.

  1. Griffith

    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


    Running psa-7.5.4 - Centos-3.5
  2. phatPhrog

    phatPhrog Guest

    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.

    # 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
    # Your password on the ftp server
    # FTP servers adress
    # Local directory where the backupfiles will be teporarily placed
    # 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
    mput dump*
    # Remove backupfiles from the Plesk server
    # Directory Name
    cat psadump* | mail -s "Server Backup Stats from YOUR_SERVERNAME for dump$date.svr" [email]YOU@ADDRESS.com[/email]
    rm -rf psadump*
    # Removes local copy of backup
    cd $backupdir
    BE SURE the file is chown, chmod:

    -rwxr-xr-x 1 root.root

    and located in your /usr/bin if running as a cronjob.
  3. Griffith

    Griffith Guest

    I mean for customers via CP. Have made my own script for backup.. but was thing for customers in CP :p
  4. phatPhrog

    phatPhrog Guest


    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.)



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

    Hope this is more help.
  5. Griffith

    Griffith Guest

    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
  6. phatPhrog

    phatPhrog Guest

    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.:
    Domain | Backup | Create Backup
    If you allow FTP backups, they can use:
    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:
    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
    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
    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.