DRS-Backup Script

Hi all

I have a script to back up all the DRS Rules in current vCenter and import into the new vCenter for migration, but has a few virtual machines to host rules "run VMs on host" type. So, I found that there is a way around to create such a rule by creating groups of MV and host groups, and then the rule. But I can not find how to get the already existing groups in old vCenter and import it into the new vCenter. That's what I use to import and export rules of the VMAffinityType-

Export-

If (Test-Path-Path $outfile) {}
Remove-Item $outfile
}
Get-data center | %{
$dcName = $_. Name
$_ | Get-Cluster | %{
$clusterName = $_. Name
$rules = $_. Get-DrsRule
{if ($Rules)}
{foreach ($rule in $rules)
$line = $dcName + ', ' + $clusterName
$line += ("," + $rule.) Name + ', ' + $rule. Permit + ', ' + $rule. KeepTogether)
foreach ($vmId in $rule. VMIds) {}
$line += ("," + (get-View-Id $vmId).) Name)
}
$line | Out-file - add $outfile
}
}
}
}

Import-

$rules = get-Content $outfile

{foreach ($rule in $rules)

$ruleArr = $rule. Split(",")

If ($ruleArr [3] - eq "True") {$rEnabled = $true} else {$rEnabled = $false}

If ($ruleArr [4] - eq "True") {$rTogether = $true} else {$rTogether = $false}

Get-data center $ruleArr [0] | Get-Cluster $ruleArr [1] | `

New-DrsRule-name $ruleArr [2] - permit $rEnabled - KeepTogether $rTogether - VM (VM-Get-name ($ruleArr [5..)) (()_$ruleArr.Count_-_1)]))

}

Here are the scripts of LUCD!

Can someone suggest a good way to integrate what I'm looking for these?

Fixing of the screens showing my current rules

Thank you

Have you ever seen need a script to export & import of DRS rules. ?

In this thread, the rules (including groups) are exported with the vNugglets script, and I've provided a modified version of the functions of Arnim to read the return policy. At the end of the script attached to this post is my script to read information from the CSV file.

Who do you want?

Tags: VMware

Similar Questions

  • Backup script no longer works in macOS Sierra

    This line in a backup script used to synchronize the folder my documents with my Synology NAS:

    rsync - avh - delete - progress ~/Library/"Mobile Documents" / com ~ apple ~ CloudDocs/Documents /Volumes

    A ran in the Sierra, he deleted the contents of the folder/Volumes/Documents on the NAS. Nothing is copied.

    The ~/Library/"Mobile Documents path" / com ~ apple ~ CloudDocs/Documents is valid in the terminal. I don't see what has changed.

    Modify the script to this:

    rsync - avh - delete - progress ~/Documents /Volumes

    A did the trick. Do not know why. The old path seems valid in the terminal.

  • MAXL - Backup Script Essbase for lack of encrypted password

    I went through the steps of...

    1. creation of public/private keys

    2. password encryption

    3. pass these components in the backup script Essbase

    From the kick-off of the EssbaseBackup.bat, it fails to connect with the username password / encrypted.

    If I remove the encrypted password and instead, encode the password, it connects fine and generates the backup file Essbase.

    Anyone of you people seen this behavior before?  All good pointers trying to solve this problem?

    Appreciate any feedback.

    Error.JPG

    It would have been useful to see your script too, but looks like you are missing $key in your statement at the opening session.

    It should be something like:

    login administrator $key 23958236592475923472398969868968756 ON HYPERION;

    I'm assuming you use you're maxl script with the parameter-d and the provision of key private after him.

  • All comments on this full backup script?

    Oracle 11.2.0.4 on Oracle Linux 6.4

    We want to replace the illegible full hot backup script provided by netbackup guys. So, I created a much more readable script. Below is the crux of the complete hot rman backup script on tape.

    I did a test backup. The backup has worked even though I did not restore, recover from this backup


    1. are there improvements you might think? However trivial, you can comment on

    2. currently, I only LIST BACKUP; and the LIST SUMMARY of BACKUP; After the backup. Should I include any other LIST control that would facilitate the identification of the elements of backup during the restoration?

    Target of $ORACLE_HOME/bin/rman = / catalog rman/mypass@catalog_db < < EOF

    run

    {

    allocate channel t1 type 'sbt_tape ';

    allocate channel t2 type 'sbt_tape ';

    allocate channel t3 type 'sbt_tape ';

    allocate channel t4 type 'sbt_tape ';

    Send "NB_ORA_POLICY = MANH_PROD_FULL, NB_ORA_SERV = hewmaster198, NB_ORA_SCHED = MANH-PROD-Backup";

    LEVEL INCREMENTAL backup = 0 format='${ORACLE_SID}_full_%U_%T.rbk database ' tag = ' ${ORACLE_SID} _hot_bkp ";

    ARCHIVELOG backup all the format = "${ORACLE_SID} % s_ %%t p_ _al_ ' tag = ' ${ORACLE_SID} _arch_bkp";

    Save the spfile tag =' ${ORACLE_SID} _spfile_bkp 'format='${ORACLE_SID}_spfile_%U_%T.rbk ';

    backup current controlfile tag =' ${ORACLE_SID} _ctlfile_bkp 'format='${ORACLE_SID}_ctl_file_%U_%T.cf ';

    cross-checking of backup;

    delete noprompt force backup expired;

    output channel t1;

    output channel t2;

    output channel t3;

    output channel t4;

    }

    backup from the list;

    backup of the consolidated list;

    "exit";

    EXPRESSIONS OF FOLKLORE

    1048827 wrote:

    Oracle 11.2.0.4 on Oracle Linux 6.4

    We want to replace the illegible full hot backup script provided by netbackup guys. So, I created a much more readable script. Below is the crux of the complete hot rman backup script on tape.

    I did a test backup. The backup has worked even though I did not restore, recover from this backup


    1. are there improvements you might think? However trivial, you can comment on

    2. currently, I only LIST BACKUP; and the LIST SUMMARY of BACKUP; After the backup. Should I include any other LIST control that would facilitate the identification of the elements of backup during the restoration?

    Target of $ORACLE_HOME/bin/rman = / catalog rman/mypass@catalog_db<>

    run

    {

    allocate channel t1 type 'sbt_tape ';

    allocate channel t2 type 'sbt_tape ';

    allocate channel t3 type 'sbt_tape ';

    allocate channel t4 type 'sbt_tape ';

    Send "NB_ORA_POLICY = MANH_PROD_FULL, NB_ORA_SERV = hewmaster198, NB_ORA_SCHED = MANH-PROD-Backup";

    LEVEL INCREMENTAL backup = 0 format='${ORACLE_SID}_full_%U_%T.rbk database ' tag = ' ${ORACLE_SID} _hot_bkp ";

    ARCHIVELOG backup all the format = "${ORACLE_SID} % s_ %%t p_ _al_ ' tag = ' ${ORACLE_SID} _arch_bkp";

    Save the spfile tag =' ${ORACLE_SID} _spfile_bkp 'format='${ORACLE_SID}_spfile_%U_%T.rbk ';

    backup current controlfile tag =' ${ORACLE_SID} _ctlfile_bkp 'format='${ORACLE_SID}_ctl_file_%U_%T.cf ';

    cross-checking of backup;

    delete noprompt force backup expired;

    output channel t1;

    output channel t2;

    output channel t3;

    output channel t4;

    }

    backup from the list;

    backup of the consolidated list;

    "exit";

    EXPRESSIONS OF FOLKLORE

    If you set UP CONTROLFILE AUTOBACKUP ON, then you don't need separate steps to back up the control and the spfile.  In fact, I do not think that you don't even need to do. Any time that the backup is a backup of the table system (datafile #1) space, it will also create a backupset to include the control file and the spfile.  Try it yourself.

    Everything in your summary of the list 'backup' is already included in your backup of 'list '.

    I would add 'delete all entries "for the backup of the archivelogs. '.  If you do not, then eventually your archivelog destination fills. (Well, if you check in CRF, then it will delete archives when there need more space - if it can and do not compromise your position of recovery.)

    In addition, to overlap/remove expiration on safeguards, I would do the same for the archivelogs.

  • With wise folder backup script date

    Hi all

    I want to take RMAN backup with date wise new folder creation scripts. e.g. today, it's 31 Oct so when I run the backup script it should create a folder name Oct. 31 and then take backup. My goal of this nice script, is that I will move daily tape backup. kindly advice.


    Thank you
    Krishna

    Hello

    I would just give you the highlights as I would:
    (1) create a shell script which create directory unix with date (e.g., mkdir/somepathhere / 'date' +%Y.%m.%d__%H%M%S ")
    (2) generate the script in which backup command in "xyz" will have xyz format, replaced by the path of complete directory of point 1.

    Paul

  • Cisco Catalyst 6509 and 6513 goes into config race disk0: / Backup Script

    We use a Cisco Catalyst 6509 and 6513 switches in our network LAN and Man.

    Please help me and share the script to take backup of all respective running to their disk0 configuration switches: / per week.

    Double post.

  • Essbase data backup script

    So I a. The MSH, with the following basic information file, where if I schedule this task, I will get a backup of data for the date file this script has been planned and in the next race, the same name of file to the backup.

    I would like to be able to get this script to save the backup based on the date it has been executed and produce a new backup file based on the date of each subsequent executions.

    Someone at - it something like that they would like to share with us?

    echo "- INITIALIZE ROUTINE -";

    echo "this script can be run every night to perform backups of data export of Essbase;

    echo "Begin recording in the backup log file ';

    spool to DataBackup_AllApps_Log.log;

    ECHO "";

    echo "- PERFORM REQUEST LOGIN -";

    echo "log on to the server by using the: userid, password and server name"; "

    login password admin on hyperionserver;

    ECHO "";

    echo '- LOG OUT ACTIVE server SESSIONS -';

    echo "commands of disconnection from the current system of execution... » ;

    ALTER system disconnect session force them all;

    ALTER database Demo.Basic unlock all objects;

    Change the system asks to kill all them.

    echo 'Objects unlock complete on server';

    ECHO "";

    echo '- EXPORT ESSBASE DATA BACKUP -';

    echo "Running export orders Database...". » ;

    export data from database demo.basic Level0 to data_file 'C:/Oracle/Administration/DataBackup/DataBackup_Demo_Basic_File.txt ';

    echo "Completed data backup export";

    ECHO "";

    echo "- TERMINATE ROUTINE -";

    spool off;

    "exit";

    Hello

    Before start using script Hari add below lines

    echo off

    @REM * SETTINGS *.

    @call D:\back\Backup.bat

    Set year = % date: ~ 10, 4%

    Set day = % date: ~ 7, 2%

    Set months = % date: ~ 4, 2%

    define a day = %% months %% % of the year

    hh = % time: ~ 0, 2%

    mm = % time: ~ 3, 2%

    the value of ss = % time: ~ 6, 2%

    the value t = % hh % mm % ss %

    essmsh %filepath%Backup.mxl % essuser % esspwd % esssvr %%%d % tm dt

    Rename 'D:\back\security.txt' 'D:\back\security%d%_%t%.txt '.

    Rename 'D:\back\alldata.txt' 'D:\back\alldata%d%_%t%.txt '.

    Backup.bat

    spool to 'D:/bck/EssbaseArchive.log ';

    Set timestamp

    connection $essuser $esspwd on $esssvr;

    poster session;

    change the system asks to kill all them.

    alter system disconnect session any force;

    export database $essApp. $essDB all data to the server data_file 'D:\back\alldata.txt ';

    security_file export of data_file 'D:\back\security.txt ';

    change the $essApp database. $essDB force archive in the folder "d:/bck/sample.arc".

    change the $essApp database. end of $essDB archives;

    spool off;

    disconnection;

    "exit";

    So that it will be not any replacement of the existing backup files, remember you will have to go for some activities of housekeeping that it could consume space.

    If _1, _2 files because although I mean more than 2 GB of data, then you may need to modify the script to rename all the files in the directory using a loop for.

    Thank you

    Amith

  • RAC and non-RAC db backup script

    Hi all

    I need to create a hot backup RMAN script for a hot full backup of database RAC 2 nodes 11.2.0.4 version.

    I have a script that works perfectly in the stand-alone database. This script ran in the database of no - ASM no CARS.

    It is: if I implement the rman script no CARS on a RAC 2 nodes using ASM database, should I change something? I don't have much experience with rman.

    Thank you.

    KZ

    Hello

    same RMAN commands should work in the CARS and environment not RAC, but it depends on how you have configured the script.

    have you configured snapshot controlfile on shared location?

    RMAN > show parameter snap

    Thank you

  • Backup script

    Hello

    I use the script "ghettoVCB4i.sh" for the backup and would like to know if there is a capacity of incremental or differential backup?

    Thank you.

    No there not the capacity for incremental backups. It simply takes a snapshot of the virtual machine and then vmdk file copy too the specified location (local storage, NFS mount etc.).

    Full feature list is here

    Ben

  • How to backup VMs that have RAW LUNS attached with TSMserver v5.5 and TSMclient v6.1 in VCBproxy in a task (backup script)

    Hallo

    I have several virtual machines that have RAW LUNS attached to them.

    Question 1: Is there a way for me to use (free LAN) save those VMS with VCB + TSMserver 5.5 + TSMclient 6.1 - in mode (an automated task - script), which local VMDK disk backup is backup with FULL-level and fasteners LUN RAW to the VM backup files of the virtual machine level. Does the solution support?

    Question 2: Is there a way in a task (separate in the 'pre' and 'post' script) as a single disc with vcb backup - for example when VM have a disk VMDK more attached, only a VMDK disk backup for is a primary partition on a virtual machine?

    Note: Backup free LAN for backup of the VCB proxy any type (level FULL or FILE) is correctly and fully functional.

    Jerome Kovac

    Hello

    Question 1: Is there a way for me to use (free LAN) save those VMS with VCB + TSMserver 5.5 + TSMclient 6.1 - in mode (an automated task - script), which local VMDK disk backup is backup with FULL-level and fasteners LUN RAW to the VM backup files of the virtual machine level. Does the solution support?

    If the RAW format is really a ROW then you can do a virtual RDM and Yes, VCB will save help file or full. If she is not a ROW but a RAW, then only the VMDK can be saved via VCB.

    Question 2: Is there a way in a task (separate in the 'pre' and 'post' script) as a single disc with vcb backup - for example when VM have a disk VMDK more attached, only a VMDK disk backup for is a primary partition on a virtual machine?

    Not only a single disc that I saw that it's all or nothing. If you don't want to VCB to backup a drive, you can mark it independent or if it's a RDM make non-virtual.

    Best regards, Edward L. Haletky VMware communities user moderator, VMware vExpert 2009
    "Now available on Rough Cuts: url = http://www.astroarch.com/wiki/index.php/VMware_Virtual_Infrastructure_Security' VMware vSphere (TM) and Virtual Infrastructure Security: ESX security and virtual environment ' [url]
    Also available url = http://www.astroarch.com/wiki/index.php/VMWare_ESX_Server_in_the_Enterprise"VMWare ESX Server in the enterprise" [url]
    [url =http://www.astroarch.com/wiki/index.php/Blog_Roll] SearchVMware Pro [url] | URL = http://www.astroarch.com/blog Blue Gears [url] | URL = http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links Top security virtualization [url] links | URL = http://www.astroarch.com/wiki/index.php/Virtualization_Security_Round_Table_Podcast Virtualization Security Table round Podcast [url]

  • weekend backup script

    Hi all.

    I need script which is to take datapump backup for every weekend... DB is Linux

    Please

    Backup Shell Script export Dump

    Before this create directory in SQL more aid

    SQL > create directory as 'rent ';

    And grant read and write to the user performing the export

    SQL > grant read, write on directory username.

    Put this in your export.sh using the vi editor

    export ORACLE_SID=
    export ORACLE_HOME=< Oracle Home>
    export ORACLE_BASE=
    PATH=$ORACLE_HOME/bin:$PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    expdp username/password directory=dpump_dir1 dumpfile=export.dmp logfile=export.log schemas=
    exit
    

    In the above script I take level diagram, you can change this mode based on your requirement

    And on-demand using crontab

  • A cold decent backup script

    Oracle version: 11 G release 2
    Platform: AIX

    After going through various messages OTN, I wrote the script for cold backup (Untested) below. If there is some unnecessary stuff or improvements, please let me know
    $ rman target /
    RMAN>
    run
    {
         allocate channel c1  type disk format '/u05/rmanbkp/%d_COLD_DB_%u';
         sql 'alter system archive log current';
         shutdown immediate;
         startup mount;
         backup database including current controlfile tag='mydbname_full_bkp';
         backup spfile tag = 'mydbname_SPFILE';
         release channel c1;
    }

    Not in the script.
    But I would make sure that ORACLE_HOME backups, parameter files (tnsnames.ora, listener.ora, sqlnet.ora, initSID.ora, spfileSID.ora, encryption key portfolio) and scripts (RMAN scripts, database administration scripts) are also stored separately.

    Hemant K Collette

  • WLC configuration or backup script?

    Hello

    I wonder if there is a way to save the WLC configuration such as a .txt file or a copy start tftp as a switch or a router command to then paste or load it to another or the same WLC.

    It's because I'm about to add a WLC backup my network whose only difference will be the name and IP address so I hope that I can avoid going step by step thanks to its configuration. Or lets say I restore default settings in my current WLC and then I want to just load a config file, or again it is a step by step process?

    Kind regards!

    The Solution has been added in the following Document: -.

    https://supportforums.Cisco.com/docs/doc-21757

    Hello

    From 5.2 or later, when you load the configuration via FTP or TFTP file, you can actually open it with a text editor and it should show a list of orders:
    http://www.Cisco.com/en/us/docs/wireless/controller/6.0/Configuration/Guide/c60mfw.html#wp1046683

    In this way, you can make changes to the text editor and load it to the WLC.
    Alternatively, you can also copy the config set as a text, switch mode config of the WLC (with the command 'config') and at the prompt "config >" just copy the entire configuration text file.

    Hope this helps,

    Fede

    --
    If this helps you or answers to your question if it you please mark it as 'responded' or write it down, if other users can easily find it.

  • Hot backup script

    My Version of Oracle's Oracle 10 g

    What happens if I put the tablespace in backup mode and I forgot to put in backup mode end, after 2 or 3 days, I see that it is still in backup mode, but I deleted the archives for the last two days. I will be able to end backup mode.

    Vivek says:
    My Version of Oracle's Oracle 10 g

    What happens if I put the tablespace in backup mode and I forgot to put in backup mode end, after 2 or 3 days, I see that it is still in backup mode, but I deleted the archives for the last two days. I will be able to end backup mode.

    Yes

  • For Symantec Backup Exec backup scripts

    Hello

    Does anyone know how to change the module of integration of Backup Exec for monolithic backups.  It's create sparse backups at this moment and identification is somewhat more complicated.

    Good instructions on how to restore the backup of the file partially allocated to another ESX host would be useful.

    Thank you very much

    Russell

    DOH!  Sorry, I gave you the location for VCB 1.1, it changed to 1.5. It should be added to the following:

    function AttachVMData(VMinfo, vmMoRef, createSnapshot, deleteSnapshot)

    Dave

    ************************

    The surest way for the world to be destroyed, most experts agree, is by accident. That's where we come in; We are the professionals. Cause us accidents.

    Nathaniel Borenstein

Maybe you are looking for

  • Can I install newer versions of Firefox OS on Alcatel OneTouch fire? How?

    I'm trying to follow a suggestion (https://support.mozilla.org/en-US/questions/1087727#answer-791503) I'm on another question I ask here, but I feel that's not possible, so I would ask here too specifically. I have an Alcatel OneTouch fire (first ver

  • iCloud backup confusion

    What does say when the iCloud backup instructions said to "lock" the screen? that is: plug your phone / connect to the WiFi / lock screen Is this all just press the button on top (5 / 5s) or side (6 / 6s) until the screen goes black OR completely dis

  • Satellite S300-10j - error 0xe0000100 in Windows 7 driver sound installation

    Hello I have troubleshooting installing my sound card with Realtek High Audio driver on my laptop Toshiba S300-10j under Wimdows 7.All the time, I got the 0xe0000100 error code when setting up my sound card. My laptop worked on Vista and I started th

  • Qosmio G50 - can I use infrared to other devices?

    Anyone could use before infrared receiver for other devices other then the remote control? I'm doing it recognize my phone and my Polar HRM but so far without success. What I see in Device Manager is appears as a device "Winbond" but it is also "eHom

  • Satellite P200-144 - where can I get a recovery disk?

    Hello I tried to reformat my laptop, but I lost the CD that came with the laptop... Is there anyway that I can get a new one? Or anyway I can reformat without the CD? Thank youJames