Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Feb 2009
    Posts
    8

    Default Use cpbackup for backups every 6 hours

    I have a cpanel account that has a fourm, and while I could easily run a mysqldump and a cp command as a backup, it would be easier for me to just go ahead and run cpbackup.

    The issue is that cpbackup runs automatically (via my whm settings) for the usual daily, weekly, monthly routine.

    I'd like to, in addition to my existing backups,

    1) run cpbackup every 6 hours just for once cpanel account.
    2) not overwrite the existing. So for example to also save the files as:

    site_backup_031409_0100
    site_backup_031409_0700

    (e.g site_backup_DATE_TIME).

    If anyone can point me in the right direction I'd really appreciate it.
    Thanks.

  2. #2
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,093
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    cpbackup actually runs the underlying pkgacct command, so you could just run "pkgacct accountname /backup/special" periodically and then move the generated backup file into a time-based filename (use $(date +%xx)).

    There might be smarter/faster/more effective ways to do this with mysql commands and tar or rsync; pkgacct is really slow.

  3. #3
    Member
    Join Date
    Feb 2009
    Posts
    8

    Default

    thanks. that's very helpful.

    it gave me a file called cpmove-acctName.tar.gz.

    Why is it called cpmove?

    Thanks.

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,342

    Default

    I would like to have my backups run every 6 hours as well. But I use the incremental system for back ups. If I try to rerun it then it just says daily backups are up to date.

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,342

    Default

    Quote Originally Posted by DWHS.net View Post
    I would like to have my backups run every 6 hours as well. But I use the incremental system for back ups. If I try to rerun it then it just says daily backups are up to date.
    You can set a cron to run this command and it will update as much as you set the cron to run: /scripts/cpbackup --force

    I am not sure how good this is for the server.

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    1,118

    Default

    To force cpbackups to run I believe you can pass the --force parameter:

    /scripts/cpbackup --force



    dawa, by default the pkgacct script will create a cpmove file. I am not sure if there are any differences between the "types" of backups, but you can resolve this by using:

    /scripts/pkgacct <user> </backup/path> userbackup

    which will create a backup file in the format of backup-m.d.Y_H:m:s_user.tar.gz

    Other options, instead of userbackup, are cpmove and backup. I do know that using userbackup will prevent the backup from storing any other userbackups that exist i your home directory. But as far as a difference between a cpmove file and a backup file, I'm not aware of any structural differences.

Similar Threads & Tags
Similar threads

  1. cpbackup - no backups - thinks backups are up to date
    By santrix in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-14-2011, 09:00 AM
  2. How to schedule backups to be restore every few hours
    By Atrex in forum Data Protection
    Replies: 1
    Last Post: 09-02-2009, 01:16 PM
  3. CPbackup failing on FTP backups
    By tmunk in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-08-2005, 04:37 PM
  4. My server crashes after running cpbackup for about 3 hours
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-01-2005, 01:16 AM
  5. Backups ./CPBACKUP
    By vinc_dc43 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-30-2003, 11:33 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube