نمایش نتایج: از شماره 1 تا 1 , از مجموع 1

موضوع: Cpanel remote FTP backup script

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1
    مدیر کل Vahid آواتار ها
    تاریخ عضویت
    Aug 2008
    نوشته ها
    2,724
    تشکر تشکر کرده 
    435
    تشکر تشکر شده 
    6,976
    تشکر شده در
    2,085 پست

    پیش فرض Cpanel remote FTP backup script

    Michal LaSalvia of EZHOSTINGPRO has created a script for remote cpanel backups. It is a basic shell script that will allow the server owner to charge for remote backups. Basically those users that pay for a remote backup service will be added to the flat file by the server admin and have a backup script put in there home directory. The only thing that is not automated is the process of adding the new user to the database and placing the placing the backup script into the users home directory.

    Michal currently has the customers fill out a form and upon submission of the payment he will create a remote ftp account and add the customers account to the backup.

    Script 1:

    #!/bin/bash

    ############################################
    ## ##
    ## EZHOSTINGPRO BACKUP FTP SCRIPT v1.0 ##
    ## Created by Michael LaSalvia ##
    ## http://www.ezhostingpro.com/backup.php ##
    ## 2/23/04 rev 1 ##
    ############################################
    ## 1. Create a file called cpbackup.txt in /root
    ## 2. Place account names you wanted backup
    ## 3. Save file in /root
    ############ DO NOT EDIT BELOW #############
    cd /root
    for users in $(cat cpbackup.txt)
    do
    rm -rf /home/$users/cpmove-$users.tar.gz
    /scripts/pkgacct $users
    mv /home/cpmove-$users.tar.gz /home/$users/
    cd /home/$users
    chown $users.$users cpmove-$users.tar.gz
    chmod 777 cpmove-$users.tar.gz
    /home/$users/bkftp.sh
    cd /root
    done

    - This script must be ran as root user to be able to call the cpanel pkgacct.

    Script 2: This script will be edited with the users ftp credentials and placd in the user home dir.

    #!/bin/bash

    ##################################
    ## EZHOSTINGPRO REMOTE BACKUP ##
    ## created by: Michael LaSalvia ##
    ## (c)EZHOSTINGPRO 2004 ##
    ## DO NOT EDIT THIS FILE ##
    ## Name this file bkftp.sh chmod 777 ##
    ##################################



    ### VARIABLES ###

    var_cpaneluser='cpanel_user_goes_here'
    #var_targetdir='public_html' /* implemented in vs2.0 still in testing
    var_remote='remote_server_goes_here'
    var_ftpuser='remote_server_ftp_username_goes_here'
    var_ftppass='remote_server_ftp_password_goes_here'

    cd /home/$var_cpaneluser
    ftp -n $var_remote <<END_SCRIPT
    quote USER $var_ftpuser
    quote PASS $var_ftppass
    del cpmove-$var_cpaneluser.tar.gz
    put cpmove-$var_cpaneluser.tar.gz
    quit
    END_SCRIPT
    exit 0
    rm -Rf cpmove-$var_cpaneluser.tar.gz


    Here are some additional comments by Michal:

    Test it out if you get any errors or issues contact me and I will correct it. This script is still in the works but this is a working model of it. Next version will have a payment system that will add the users to the db and auto place the files in the correct directories.

    This code is not to be changed or sold - it is is released under the left hand gpl.

    Please contact Michal for questions or concerns.
    برای پیش رفت در علم آسانسوری وجود ندارد پله ها را باید پیاده رفت /./ همیشه این یادتان باشد که دست بالای دست بسیار است.
    يادمان باشد براي يك بار ايستادن صد ها بار افتاده ايم /./ بک آپ مهمترین رمز موفقیت هاستینگ /./ امنیت مطلق نیست.
    ارتباط مستقیم با من :
    Admin -{(@)}- WebHostingTalk . ir

  2. تعداد تشکر ها ازVahid به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. مشکل با remote backup در cpanel
    توسط jpmo02 در انجمن مباحث دیگر
    پاسخ ها: 3
    آخرين نوشته: March 12th, 2015, 01:50
  2. نیازمند برنامه ای برای cpanel remote backup
    توسط 3d-max در انجمن سی پنل CPanel
    پاسخ ها: 6
    آخرين نوشته: December 25th, 2012, 15:21
  3. پاسخ ها: 6
    آخرين نوشته: December 19th, 2012, 20:47
  4. آموزشی ایجاد Backup بوسیله Script های Cpanel/WHM
    توسط cutegroup در انجمن مباحث دیگر
    پاسخ ها: 0
    آخرين نوشته: May 19th, 2012, 10:17
  5. cPanel/WHM remote rsync backup plugin
    توسط nimapendar در انجمن سی پنل CPanel
    پاسخ ها: 14
    آخرين نوشته: June 24th, 2011, 23:45

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •