Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

how i can change name of backup file ?

Discussion in 'General Discussion' started by haulpd, Jun 21, 2013.

  1. haulpd

    haulpd Active Member

    Joined:
    May 20, 2011
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    58
    How i can change name of backup file name with cpbackup, (Legacy Backup).
    Thank Bro.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    You can rename a file with the "mv" command. EX:

    Code:
    mv filename.tar.gz new-filename.tar.gz
    Could you let us know why you need to change the name of the backup file? For example, are you having trouble restoring it?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. haulpd

    haulpd Active Member

    Joined:
    May 20, 2011
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    58
    i want to rsync it to 1 another server. And i want to change file name will store on /backup/ when cpbackup run.

    Thank you.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    There are no native features with the existing backup system that allow you to modify the default name used for backup archives. You would need to develop a custom post stage System::Backup hook that modifies the name of the backup archives.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. haulpd

    haulpd Active Member

    Joined:
    May 20, 2011
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    58
    i,ve change name to user-domain_yyyymmdd.tar.gz but i can not restore with Cpanel, i'm forced change it to user.tar.gz. I see in /script/restorepkg

    if ( $file =~ m/^cpmove-(\S+)\.tar(?:\.gz$|$)/ ) {
    print "Using cpmove archive\n";
    $user = $1;
    }
    elsif ( $file =~ /^backup-\d+\.\d+\.\d+_\d+\-\d+\-\d+_(\S+)\.tar(?:\.gz$|$)/ ) {
    print "Using backup archive\n";
    $user = $1;
    }
    elsif ( $file =~ m/^(\S+)\.tar(?:\.gz$|$)/ ) {
    print "Using username archive\n";
    $user = $1;

    and it call whostmgr5 to restore, How i can defined file name backup file can restore. ? Thanks.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    The backups must be named in one of the following formats in order to be restored:

    Code:
    cpmove-{USER}
    cpmove-{USER}.tar
    cpmove-{USER}.tar.gz
    USER.tar
    USER.tar.gz
    backup-{BACKUP-DATE_TIME}_{USER}.tar
    backup-{BACKUP-DATE_TIME}_{USER}.tar.gz
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice