List sql backups in a folder then restore the selected backup to the selected database

Hi
I'm created a script that lists the backups in a folder then allows user input to select a backup.
It then needs to list the sql database on a specific server and accepts user input.
I can list the backups as follows
$Dir = get-childitem $CurDir -recurse
$List = $Dir | where {$_.extension -eq ".bak"}
$List | format-table name
but what I want to know is how to format the list to have a number for the selection next to it?
How can I get a list of the sql databases on the server.
Thanks
Wayne

Hi Wayne,
I’m writing to just check in to see
if the suggestions were helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up.
If you have
any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support

Similar Messages

  • HT1711 I backed up my iphone5 in the morning and later again on the same day, in the afternoon. I then restored an older backup from the morning. Now all my music files refuse to play even though they still appear on iphone. How can I resolve this?

    I backed up my iphone5 in the morning and later again on the same day, in the afternoon. I then restored an older backup from the morning. Now all my music files refuse to play even though they still appear on iphone. How can I resolve this?

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • Restoring from an older backup and then restoring to latest backup

    Okay where to begin.... By removing an email account from my phone, I ended up deleting all my 'notes.' Unfortunately I had encrypted my backup and therfore cannot find a third party software that can restore just my notes. I also found how to rename an old back-up, then (after unchecking 'encrypt backup'!) create a new backup in order to have multiple backups. My plan is to now restore to my first backup, recover my notes, then restore to my latest backup. My concern is that I will lose the pictures from my camera awesome app that I have taken since my fist backup, or even the ones before. There seems to be issue access those pics through windows explorer. Through research I have found that I do not understand what is and what is not backed up (to the detail at least that I am concerned with i.e. photos within a particular app). So what can I expect if I move forward with my plan or is there a way I can just restore/view my notes from the original encrypted backup? By the way I do in fact remember the password for the encrypted backup.

    To quote myself:
    "My plan is to now restore to my first backup, recover my notes, then restore to my latest backup. My concern is that I will lose the pictures from my camera awesome app that I have taken since my fist backup,.....So what can I expect if I move forward with my plan or is there a way I can just restore/view my notes from the original encrypted backup?"

  • Ipod reset to old setting with old icloud ID.  How do I reset it to use new login for icloud and then restore from icloud backup

    My upgrade to iOS 8 failed and I had to restore my iPad from an old backup (since restoring from cloud wasn't given as an option).
    Now the iPad has my old iCloud account configured instead of the one I've been using for the past year or so.  How do I:
    1. Get the iPad to use the correct iCloud account?
    2. Restore the iPad from an iCloud backup?
    Everytime I try to log out of iCloud it prompts me for the password on the old account to allow me to turn off "Find my iPad".  I don't think that account even exists anymore.  I tried to reset the password on the old account (using an old email address), but the password email never arrives.
    Help!

    Make sure you are signed into iMessage and FaceTime with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iDevice and enter your current password when prompted (even though it prompts you for the password for your old ID).  Then go to Settings>iCloud, tap Sign Out (or Delete Account if you are not running iOS 8) and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).
    If you need to restore an iCloud backup, it's explained here: iCloud: Restore your iOS device from iCloud.

  • I want to reset my iPhone then restore from a backup...

    Hello again Apple community.
    I have an iPhone 5 and I want to reset it then restore it from a backup. I go to Settings -> General -> Erase all Content and Settings. I then enter my passcode, press Erase iPhone, and then press Erase iPhone on the confirmation screen. However, when I do that it tells me to enter my Apple ID password to erase the iPhone "and remove it from your account." The thing is, I'm not sure I want to do this because if I do, I'm afraid that it'll delete all of the purchases (apps, music, etc.) from my account and I will have to buy EVERYTHING again. Does anyone know if it'll delete all of my purchases or, better yet, does anyone know how to bypass this? I never remember this happening when I had iOS 6. I do have it backed up to my MacBook Pro.

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
                iPad,iPod,iPod Touch Recovery Mode
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
    Also, see iTunes- Restoring iOS software.

  • Ipad 2- Failed Restore after 5.0. But it tried to backup again. Can I restore to previous backup or is all gone and overwritten?!?!

    This is what I did...
    Got latest Itunes...
    9:30pm---Backed up and SYNCed my whole Ipad 2 which was a lil over 8GB onto my computer (LIKE AN HOUR)
    **I had 2gb left free on my comp after that backup
    Downloaded Ipad 2 (WIFI) direct 5.0 update file. (around 700mb)
    **around 1gb left on comp
    Shift+Restore>Selected the 5.0 update file
    UPDATED to 5.0
    Turned on Ipad
    Selected "Restore Ipad", says its going to take 2 hours
    Computer basically went to 0gb after an hour. which I dont know why it was trying to backup AGAIN for.
    Itunes says restored failed. nothing on the Ipad, still on the "Connect to Itunes" screen. So I unplug n plug again. And it syncs n backsup for like 3 minutes.
    I press restore again, it asks to restore to my 12:00midnight BACKUP?!?! not my 930 BACKUP?
    Don't see any other option than just to do that one. It restores in about 2 minutes and I'm finally at the homescreen. NOTHING AT ALL except the apps that got synced.
    Now I worry all is lost because now my computer says around 6gb free. What happend to my only having 1gb free after my 8 gb backup/sync?
    Is there a way to restore from my wanted/initial/previous backup with all my photos n videos and everything??

    It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the files sessionstore.js [2] and sessionstore.bak in the Firefox Profile Folder.
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    See also:
    * [1] http://kb.mozillazine.org/Session_Restore
    * [2] http://kb.mozillazine.org/sessionstore.js

  • Need inputs on RMAN Backup n Recovery for multiple restore of clean backup

    I will explain my scenario below:
    We have the requirement of performance testing of our proposed production platform, for this i am asked to take RMAN backup of clean position (Say Day0 or baseline backup) and restore it multiple times for few rounds of testing. My question is after 1st restore (with set until time of day0 position) if i open the database with resetlogs, would i be able to restore same clean backup again? I am using control file in the environment instead of RMAN catalog database. What i can do to make this scenario work? I am already in preperation of setting rman catalog database.
    Please suggest me the best way forward...
    Many Thanks
    Nukesh

    Hi Asif,
    I tried to make it work but seems there are still issue with my recovery, can you have a look and point out the shortcommings. i am totally lost here
    RMAN> list incarnation;
    using target database control file instead of recovery catalog
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 MYTEST 2433328848 PARENT 1 19-DEC-06
    2 2 MYTEST 2433328848 PARENT 564488 04-NOV-10
    3 3 MYTEST 2433328848 CURRENT 693719 06-NOV-10
    RMAN> exit
    TEST1DB-> rman target sys@MYTEST1
    Recovery Manager: Release 10.2.0.3.0 - Production on Sun Nov 7 11:43:01 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    target database Password:
    connected to target database: MYTEST (DBID=2433328848, not open)
    RMAN> reset database to incarnation 2;
    using target database control file instead of recovery catalog
    database reset to incarnation 2
    RMAN> run {
    2> restore database until scn 10000;
    3> recover database until scn 10000;
    4> alter database open resetlogs;
    5> };
    Starting restore at 07-NOV-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=191 instance=MYTEST1 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=190 instance=MYTEST1 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/07/2010 11:45:18
    RMAN-20208: UNTIL CHANGE is before RESETLOGS change
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, c onnect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, l ibrary, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rm an, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, va lidate"
    RMAN-01007: at line 0 column 2 file: standard input
    RMAN>
    RMAN> show all;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rmanbackup/MYTEST/ora_cf%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rmanbackup/MYTEST/ora_df%t_s%s_s%p';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10g/dbs/snapcf_MYTEST1.f'; # default
    RMAN> exit
    SQL> select name from v$database;
    NAME
    MYTEST
    SQL> show parameter CONTROL_FILE_RECORD_KEEP_TIME
    NAME TYPE VALUE
    control_file_record_keep_time integer 7
    SQL>

  • Imac-- Upgrading elements 10 to elements 12. Did successful backup of 10.  When restore to 12 message said the disk in drive My Passport for Mac does not contain a valid backup

    IIMac      doing upgrade of Elements 10 to Elementys 12.  Did full backup of 10 on my external hard drive "MY Passport".  Rec'd message backup successful.  Did restore on 12 and rec'd message "The disk in drive My Passport for Mac does not contain a valid backup".  Any help suggestions?

    The funniest part of the whole situation, Apple Care explained it to me as some kind of feature. The told me how to adjust the time when my computer sleeps and recommend I don't shut it down, let it sleep and "instant wake". I would bet if you called them about your Macbook, they would suggest you just close the lid and let it sleep rather than shutting it down.
    Basically shutdown and restart have a problem and the solution is to not shutdown is how they explained it to me. They kept saying buzz words like "instant on" and "fast wakeup". My computer already could sleep and wakeup fast, but now shutdown and restart don't work right. I called them 3 times about it, but since they use these buzzwords, sounds like Lion is meant for a Macbook Air or a Mac with an SSD. If you have a normal hard disk, some of the saving/versions/resume features take too long to be written to the disk on shutdown. And when you start again, it takes a long time to reload the system to it's previous point.
    Even if I uncheck the box to reopen windows on next start, it reopens them anyways.
    If they can't give me a better explaination or some kind of fix, I will have to go back to Snow Leopard. I use my Mac in a production environment and depend on stability. They assured me before I upgraded that it would be stable and all the new saving and versions features could help my productivity. So far it's not helping me and downright annoying. You need to close all your windows before you close the program... if you have 5 windows open in terminal or textedit... every time you launch, they will launch all those windows. I just really want versions, not resume it seems.
    But I can deal with it opening a million windows, just can't take it getting stuck on booting or not shutting down properly. This is a "feature" that should be fixed. LOL

  • Superduper backup to disk image then restore from disk image

    Im trying to get bootcamp to work but it told me to backup, format and restore. Im currently copying my data to a disk image. Am i able to restore this or is it pointless?
    Thanks

    You can do it your way, but the intended way is to use FileVault to encrypt your Home folder. When you log out of your account then TM will begin the backup of the encrypted Home folder. No need for you to encrypt or decrypt your own disc image.
    If you allow TM to run hourly backups as you now do, then both your Home folder and your backups are not secure.

  • Failed to backup my new iPhone, then restored from iPod, lost pics on new iPhone!

    I have been using an iPod for two years, and been good about backing it up.  I finally bought an iPhone, and backed up my iPod one final time.  I then didn't find the time to restore to the new iPhone, and used it for two whole weeks.  I finally remembered, and restored from my old to my new iPod.   Unfortunately I forgot I had taken 100 pics on my new iPhone, and I lost them all.  Are they recoverable?  My son's first homecoming and first crew regatta pictures (of course). Heartbroken.  I sent a few pics to my son, but I lost the rest.  Thanks for helping is you can.  Yes, I learned my lesson!

    Lindymomma wrote:
    I had never used iCloud unfortunately
    That is a shame. See Backup your iTunes for Windows library with SyncToy for a way to backup your iTunes library and other personal data folders.
    tt2

  • My Blocked Sender list got erased. How can I restore it from backup?

    Where is the Blocked Sender List file located and what is it's name?

    It's not in Firefox. Firefox doesn't do email, it's strictly a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/] <br />
    or this one <br />
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • HT1212 Hi, I've backed up my iphone before and i forgot the password, then i follow the instruction, backup again first then restore, but unfortunately it still the same !!!!!!! keep tells me iPhone is disabled, it's a iOS5 system

    so what can i do now ? is there anyway to make it open? thanks. it's urgent...

    Read the article from which you referenced.  It tells you how to restore your phone if you can't remember your pascode. 

  • HT4759 ive lost my iphone and its been backup and ive tried to restore it to ipad but the restore doesnt show up at all. can anyone help please?

    i've tried everything but i cant seem to find any way of doing it. can anyone please help me i just want to restore my iphone back to my ipad

    Your iPad has to be running the same or higher version of iOS as you phone was in order for the backup to appear.  If it isn't, you'll have to update your iPad first.  There are some limitations involved in restoring an iPad to an iPhone backup to be aware of, including:
    Camera Roll photos and videos are not restored.  These can only be restored to another iPhone.
    Third-party apps and their data will be restored but the app icon order/organization won't be.
    iPhone-only apps will not be restored to an iPad.

  • Use Powershell Command to Search A Folder Then Move Any Subfolders and Where The Folder Name Contains "ARC"

    Hi All,
    As a complete novice to the powershell world I am looking for some direction in a script to manage my work project data lifecycle.
    I have a share on our production server (\\PROD1\Projects) which contains folders starting 99ENGXXX that contains project work, when staff rename the folder to ARC99ENGXXX, I am trying to work out a powershell command to move the folder and its contents
    to a share on a archive server (\\ARC01\Projects). Both are windows servers.
    Any help would be greatly appreciated!
    Sammy

    Try this (Assumes you are running at least PowerShell V3):
    Get-ChildItem "\\PROD1\Projects" -Recurse -Filter "ARC*" -Directory |
    Move-Item -Destination "\\ARC01\Projects"
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Can i transfer my backup to another computer and then restore my backup

    can i transfer my backup to another computer and then restore my backup

    Yes.  However, the backup file does not necessarily contain everything on your device (music, some purchases, some photos) so you want to make sure all items are backed up and transferred for safekeeping first.
    iOS: How to back up  - http://support.apple.com/kb/HT1766
    iTunes: About iOS backups - http://support.apple.com/kb/HT4946 - including a list of what is backed up.
    How to Restore iPhone From Backup - http://ipod.about.com/od/iphonetroubleshooting/ss/restore-iphone.htm
    iTunes: Backing up, updating, and restoring iOS software - http://support.apple.com/kb/HT1414
    You will need to copy the backup file from one computer to another:
    http://support.apple.com/kb/ht4946 - iTunes: About iOS backups > Where iTunes backups are stored on your computer

Maybe you are looking for