Schedule Scripts

Discussion in 'Paragon Drive Backup Product Line' started by whitedragon551, Jul 7, 2015.

  1. whitedragon551

    whitedragon551 Registered Member

    Joined:
    Sep 30, 2008
    Posts:
    3,189
    Location:
    USA
    I am trying to make a scheduled script in Hard Disk manager 15 Backup and Recovery Compact. I want it to be a weekly backup and to change the file name with each backup with the format backupname_mm_dd_yyyy. I want to keep a total of the last 7 backups on file. Is this possible and if so how? Any time I have created a backup script it keeps the name of the job and it over writes my existing backup.

    Current Backup script example:

    Code:
    // This file was automatically generated by Paragon script generator
    // Use Paragon Script Interpretator to run this file
    // Time of creation: Tue Jul 07 23:19:59 2015
    
    
    // Settings block
    settings
        surfacetest off
        verify off
        copyonetoone off
        hddrawprocess off
        donothidetarget on
        bigdrives off
        compressionlevel 10
        nodellabel off
        timeshift -300
        oemcodepage 437
        timezone 11
        langnumber 3
        enablerestart on
        enablevirtualdb on
        autoconverttofat32 on
        bootcdiso "./../ISO/bootcd.iso"
        bootcdtype every
        fixtargetbcd off
        sectordiffmethod metadata
        filediffmethod metadata
        process11policy ask
        hotbackup lockimpossible
        tempdrive C
        vss2hbswitch off
        vssattempts 3
        vsstimeout 120
        enablefixtargetefinvram off
    endsettings
    
    // Turn off confirmation
    confirm off
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 2048
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 616448
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 821248
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 1083392
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    // Backup partitions or disks to virtual containers
    print "Backup partitions or disks to virtual containers"
    print ""
    vd_store_options
        label = "Backup_image_20150707_2319"
        cmp normal
    vd_store /path = "\\NAS/Backups/Full Backups/" /name = "Backup_HDD0_20150707_2319" /vendor = "PVHD"
    
    // Check for errors
    call check_error
    
    // Apply all scheduled operations
    apply all
    
    // Check for errors
    call check_error
    
    // Exiting
    // exit(0)
    
    // Function for checking error
    check_error:
        if (errorcode(1) != 0)
        then
            print "Some error occured: "
            strerror(errorcode(1))
            print ""
            print "Exiting"
            print ""
            exit(errorcode(1))
        endif
    endcall
    
    
    What I would like it to be is:

    Code:
    // This file was automatically generated by Paragon script generator
    // Use Paragon Script Interpretator to run this file
    // Time of creation: Tue Jul 07 23:19:59 2015
    
    
    // Settings block
    settings
        surfacetest off
        verify off
        copyonetoone off
        hddrawprocess off
        donothidetarget on
        bigdrives off
        compressionlevel 10
        nodellabel off
        timeshift -300
        oemcodepage 437
        timezone 11
        langnumber 3
        enablerestart on
        enablevirtualdb on
        autoconverttofat32 on
        bootcdiso "./../ISO/bootcd.iso"
        bootcdtype every
        fixtargetbcd off
        sectordiffmethod metadata
        filediffmethod metadata
        process11policy ask
        hotbackup lockimpossible
        tempdrive C
        vss2hbswitch off
        vssattempts 3
        vsstimeout 120
        enablefixtargetefinvram off
    endsettings
    
    // Turn off confirmation
    confirm off
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 2048
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 616448
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 821248
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    select disk "D668A975-2D92-4762-9F91-BE2E3A4A5AFD"
    select partition offset 1083392
    vd_store_item partition
    
    // Check for errors
    call check_error
    
    // Backup partitions or disks to virtual containers
    print "Backup partitions or disks to virtual containers"
    print ""
    vd_store_options
        label = "Full_C_Backup_Month_Date_Time"
        cmp normal
    vd_store /path = "\\ELSTON-NAS/Backups/Full Backups/" /name = "Full_C_Backup_Month_Date_Time" /vendor = "PVHD"
    
    // Check for errors
    call check_error
    
    // Apply all scheduled operations
    apply all
    
    // Check for errors
    call check_error
    
    // Exiting
    // exit(0)
    
    // Function for checking error
    check_error:
        if (errorcode(1) != 0)
        then
            print "Some error occured: "
            strerror(errorcode(1))
            print ""
            print "Exiting"
            print ""
            exit(errorcode(1))
        endif
    endcall
    
    
    The date time month options are hard coded into the script. I would like them to be based on system time/date.
     
    Last edited: Jul 7, 2015
  2. John2222

    John2222 Registered Member

    Joined:
    Sep 27, 2005
    Posts:
    140
  3. whitedragon551

    whitedragon551 Registered Member

    Joined:
    Sep 30, 2008
    Posts:
    3,189
    Location:
    USA
    That seems to have worked perfectly. Now how do I configure full backups only to keep the last 7 full backups. A full backup will be taken every sunday and 7 of them will be kept. As new backups are taken, any backups older than 7 days will be auto deleted. Is this possible?
     
  4. John2222

    John2222 Registered Member

    Joined:
    Sep 27, 2005
    Posts:
    140
    Sorry I don't know to accomplish that. It would be a good feature. Maybe someone else knows that answer.
     
Loading...