Restore entire disk using Paragon Script Language

Discussion in 'Paragon Drive Backup Product Line' started by Epsix, Nov 19, 2014.

  1. Epsix

    Epsix Registered Member

    Joined:
    Nov 19, 2014
    Posts:
    2
    Dear all,

    For the past few days I've been trying to resolve a problem our company is having. Our company installs industrial PC's for our customers, and our field engineers use a bootable USB stick with Paragon Disk Manager to install an entire OS onto the new hardware. Field engineers are trained to do the few steps it requires to actually restore an image on a disk. This has all worked great for the past few years.

    However nowadays we want to do an extra step after restoring an image. After restoring an image we want to push a few files from the USB stick onto the freshly installed OS. This is perfectly possible using the File Transfer Wizard that Paragon supplies, however the sheer number of files makes it prone to errors when having to do it by hand. I'll just state right now that baking these files into the image beforehand is not an option. These files change more frequently than the image changes.

    So my solution to this was to automate both steps using PSL. However I can't seem to get it right.

    When I create a backup of a drive using the wizard I can choose to "Generate script" rather than actually doing the backup. This function is missing from the restore wizard (I am using Paragon Disk Manager 10). The script_man.pdf document suggests that restoring an image using PSL is perfectly possible, however I have not been able to get it done. Using the backup script generated by the backup wizard, I tried to piece together how the restore script should look like, but to no avail.

    Here's what I'm trying to run:

    // This file was automatically generated by {VENDOR_NAME} script generator
    // Use {VENDOR_NAME} Script Interpretator to run this file
    // Time of creation: Wed Nov 19 13:03:29 2014


    // Settings block
    settings
    surfacetest off
    verify off
    copyonetoone off
    hddrawprocess off
    allow64kcluster off
    donothidetarget on
    copyinsteadofmove off
    bigdrives off
    compressionlevel 10
    sidafterdisk off
    sidafterpartition off
    defaultsidchanger on
    nodellabel off
    timeshift 60
    oemcodepage 437
    timezone 22
    langnumber 3
    slavecfg off
    notforslave off
    enablerestart on
    enablevirtualdb on
    autoconverttofat32 on
    sidparams ""
    bootcdiso ".\..\ISO\bootcd.iso"
    hotbackup lockimpossible
    tempdrive E
    vss2hbswitch off
    vssattempts 3
    vsstimeout 120
    endsettings

    // Turn off confirmation
    confirm off

    // Restore
    img = "E:\IMAGE\IMAGE.PBF"
    select disk 0
    select partitions all
    options
    cmp = 10
    mfs = 4096000
    notempfiles
    label = "No comment"
    autonames
    hotbackup lockimpossible
    tempdrive E
    usevss
    restore

    // Apply all scheduled operations
    apply all

    // Exiting
    // exit(0)


    I didn't think most of these settings were necessary so I stripped them all down. But that gave me a myriad of errors. So I kept all of them assuming some of them may be important.

    The errors that I'm getting when I run this script are:

    Grammar: error. There is no rule which contains such word: "RESTORE".
    Grammar: error. There is no rule which contains such word: "APPLY".

    I was wondering if somebody could point me into the right direction or ideally supply a working sample any restore operation. Right now my train of thought is that this has to be done doing either

    select archive > (source:) select disk in archive > (destination:) select physical disk > apply.

    OR:

    format physical disk > select archive > (source:) select disk in archive > (destination:) select free space > apply.

    I'm going to continue exploring both of these options, but I hope that any of you may be able to help.

    Cheers
     
  2. Epsix

    Epsix Registered Member

    Joined:
    Nov 19, 2014
    Posts:
    2
    Well, while writing the above message things suddenly became clearer to me. I managed to get the restoring part working like this:

    // Turn off confirmation
    confirm off

    // Delete all
    select disk 0
    delete all

    // Restore image
    unselect all
    select disk 0
    select freespace first
    img = "E:\VI_S_IPC_IMAGE\VI_S_IPC_IMAGE.PBF"
    select image all
    restore

    Now all I need to figure out is how to transfer a file to an unmounted partition.
     
Loading...