Backup AX from script?

Posted by rvandermey 

Does anyone have a way to backup an AX via a script? I'd like to schedule a daily backup of the config. I've tried using plink.exe to automate an ssh session but I'm not having any luck.

This is what I see when I use -v for verbose output:

Connecting to 172.25.85.250 port 22
Server version: SSH-2.0-OpenSSH_5.8
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Release_0.61
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 2048 4c:e6:58:3c:f1:f8:3e:a3:40:76:f5:07:72:61:37:18
Initialised AES-256 CBC client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 CBC server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "admin".
Access granted
Opened channel for session
Started a shell/command
/a10/bin/rimacli: invalid option -- c
Server sent command exit status 255
Disconnected: All channels closed

Comments

  • mischamischa Member
    edited February 2014
    Posted by mischa

    In 2.6.1 you can do that from the AX itself:

    (config)#backup periodically system ?
    day Specify interval days
    hour Specify interval hours
    log Backup log files
    week Specify interval weeks

    (config)#backup periodically system day 1 ?
    use-mgmt-port Use management port as source port
    tftp: Remote file path of tftp: file system(Format: tftp://host/file)
    ftp: Remote file path of ftp: file system(Format:
    ftp://[user@]host[:port]/file)
    scp: Remote file path of scp: file system(Format:
    scp://[user@]host/file)
    rcp: Remote file path of rcp: file system(Format:
    rcp://[user@]host/file)
  • rvandermeyrvandermey Member
    edited February 2014
    Posted by rvandermey

    Thank you for the help setting up our automated backups. It works great.

    I have another question. We have two AX2500's in a VCS cluster, and I wondered if the backup file includes the configuration for both AX2500's. So I opened the tar file and found that it only includes configuration files for one of the two.

    This may be adequate because most of the configuration is shared among both AX2500's, but I wonder if there's a way to backup the /etc/network/ifconfig.eth0 file for example from both AS2500 units.
  • edited February 2014
    Posted by ddesmit

    When you have 2 or more devices in a Virtual Chassis (VCS) the configuration on AXs is synched between all the AX devices in real time.
    In other words, each AX is aware of:
    . the "shared config" (VIP, SNAT, etc)
    . but also the "individual config" (IP@, hostname, etc)

    When you configure "backup periodically" on the VCS-Master, than command is also done on all VCS-Blades (AXs).
    So you should have a system backup on your FTP server from all the AXs.
    Note: Do a "show backup" on all AXs to validate it.

    Dimitri
  • rvandermeyrvandermey Member
    edited February 2014
    Posted by rvandermey

    Thanks again. Your response made me look more at the documentation. My problem was I was specifying the file name. Now that I specify only the folder name in the url, it get a file from each AX2500 because they give it a unique file name that includes the name of the AX2500.

    So now I'm trying to test the restore process.

    restore use-mgmt-port scp://a10bkup@(ip address)/logs/A10Configs/MIOKA10AX25002_backup_period_2011-09-25-13-07-11.tar.gz

    This is what I get:

    .....0 minutes 5 seconds
    Incorrect restore file format
    Failed to restore system files

    Any ideas? I has to be the correct format because that's the backup file that the backup command produced. ????
  • edited February 2014
    Posted by ddesmidt

    Hello,

    That's actually a bug that has been recently found by QA in our new 2.6.1 "backup periodically" feature.
    I'm sure it will be fixed soon.
    You can also open an A10 support bug to track it.

    Thanks and sorry for the inconvenience,
    Dimitri
  • edited February 2014
    Posted by ddesmidt

    Hello,

    That's actually a bug that has been recently found by QA in our new 2.6.1 "backup periodically" feature.
    I'm sure it will be fixed soon.
    You can also open an A10 support bug to track it.

    Thanks and sorry for the inconvenience,
    Dimitri
  • edited February 2014
    Posted by ddesmidt

    FYI this will be fixed in the 2.6.1-P2.
    Note: I validated it in our 2.6.1-P2 candidate.

    Dimitri
Sign In or Register to comment.