Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2006
    Posts
    9

    Question How do I backup the Puplic_html folder using a corn job ?

    Hello,

    I would like to backup only the folder puplic_html using a corn job, so what should I type in the command line ??

    I really appreciate it if someone replied .

    Thanks

  2. #2
    Member
    Join Date
    Jul 2004
    Posts
    496

    Default

    Code:
    rsync -auv /home/user_name/public_html /backup-destination

  3. #3
    Member
    Join Date
    Nov 2006
    Posts
    9

    Default

    Really thanks a lot,

    But this command synchronizes folders ( puplic_html, and distention folder ), I wanted to zip the puplic_html for a backup using corntab.

    So, would you please help me with this command.

    Thanks

  4. #4
    Member
    Join Date
    Jul 2004
    Posts
    496

    Default

    Try this then:
    Code:
    cp -r /home/user/public_html  /destination  | gzip -r /destination/public_html
    Last edited by kernow; 11-29-2006 at 08:30 AM. Reason: correction

  5. #5
    Member
    Join Date
    Nov 2006
    Posts
    9

    Default

    after a long search i found this line, and it worked,

    tar -czf /home/user/distenation/public_html.gz.tar /home/user/public_html

    also i could use tar - cvf command, for a public_html.tar backup.

    but i'll try your line.

    thanks a lot

  6. #6
    Member serversphere's Avatar
    Join Date
    Jan 2004
    Posts
    658

    Default

    corn job sounds obscene... sorry, just made me laugh alot for some reason. Keep in mind with this cron job that you will be taking up alot of space within the users accounts. Be careful not to put people over their limit.

  7. #7
    Member
    Join Date
    Nov 2006
    Posts
    9

    Default

    I thought the same, but when I tried, I noticed that it overwrites the existing file.

    So, there is no fear to lose a lot of space.

    Thanks for that notice

  8. #8
    Member
    Join Date
    Jun 2005
    Posts
    159

    Default

    Quote Originally Posted by webtiva View Post
    corn job sounds obscene... sorry, just made me laugh alot for some reason.
    You and me both

Similar Threads & Tags
Similar threads

  1. Corn Job Problem
    By mudassirjaved in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-17-2010, 04:51 AM
  2. Corn job Error
    By niravmehta2009 in forum Discusión en Español
    Replies: 1
    Last Post: 03-02-2010, 07:00 AM
  3. Replies: 0
    Last Post: 01-22-2010, 04:53 PM
  4. Replies: 1
    Last Post: 07-04-2009, 02:04 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube