Automation of Essbase backup

Hi Guys,
My query is about the backup and restore feature with transaction logging and replay where the backup are taken automatically and the recent changes before the crash are recovered through transaction logging and replay. Can anybody tell me how to initiate that automatic backup process ? Whether it can be done through the console or does it need a command in maxl or esscmd. And the how to initiate the transaction logging and replay.
Thanks in advance

Hi There,
Just ADD below commands to your Config file....and also create Replay Folder to store the transactions.
TRANSACTIONLOGDATALOADARCHIVE Application database SERVER_CLIENT
TRANSACTIONLOGLOCATION Application database D:\Replay NATIVE ENABLE
You can serach for thses commands in technical reference for more information.
Cheers,

Similar Messages

  • Essbase Backup Automation

    Hi all
    I want to automate the backup for essbase. What is the best possible way to do so, as far as i red a thread Re: Essbase Backup
    which tells the automation through maxel script is possible i want to know the efficient and effective methods used around.
    Your valuable suggestions and comments are much needed .
    Regards
    Ace,

    Thank You John,
    I want A suggestion if data size is increasing significantly like upto 50 GB or plus what is recommended as the best practice for backup automation.
    Currently i am doing export with the help of MaxL script scheduled through Windows Scheduling, Well as export it the most time consuming meth in all of the possible ways what is the best the can be adapted.
    A bundle of Thanks for your help and support.
    Regards
    Ace,

  • Online Essbase backup

    Hi All,
    Can anyone tell me the how do i do the online essbase backup.
    IF yes how and can i take backup of database while calculations are executing....
    Regards,
    Mink

    Yes, I've had similar environments. On larger cubes you don't often get savings because the "changed files" equals the "entire database" every day, at least for environments where time is dense. Robocopy is good, I've used it almost everywhere (although they are unrelated, that's why I tried RoboTask in the first place).
    The staging area I use is only 3 copies of each database, but that's arbitrary (the batch job supports grandfather/father/son schemes of up to 9 levels, plus any number of "type" qualifiers -- like daily, weekly, special, deep archive, etc...). With restoration just a double-click (and about 15 minutes) away at any point for any "stored" backup. So we also have no need to go to tape unless it's a true D/R.
    I don't even have to change anything for new production apps, it's part of the shell script that runs the data load as a single command call (the shell also sends email when finished -- if the script has the meta-tags for it), and creates a daily log of begin/end entries for each process.
    The real key is using a standard framework -- which is like skinning cats so there's no point in saying one is ideal or better than another. On the detail level however, being able to fit a new piece into the framework can definitely be done better or worse. :)
    To me, the real proof came in our last D/R test (I know, I talk about it often enough) -- but what I didn't say was that *I* didn't even do the recovery. The Junior admin did it with about 3 months of experience in essbase. I was officially dead on the site and only took notes. That tells a lot about system recoverability.

  • Storing Multiple Essbase Backups

    Hello,
    We currently run a nightly backup using the MaxL script below. Due to a change in business practices, we now need to save mulitple days worth of backups instead of writing over the previous night's backup, as we do in this script. Does anyone know of a way to include today's date in the name of the file? Right now we have it named as Plan1BkupLv0.txt but I would like it to read "Date"Plan1BkupLv0.txt, where "Date" represents the date the backup is run. Any assistance is greatly appreciated!
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    /* * Start log file output. * */
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    spool on to 'G:\Hyperion\Automation\Backups\TelePlan\Plan1\Plan1bkStartlog.txt';
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    /* * Log on to application. * */
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    login ;
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    /* * Ensure Application and database               * */
    /* *     is loaded before archive.               * */
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    alter application 'TelePlan' load database 'Plan1';
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    /* * Export all data in "Column" format. * */
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    /*export database 'TelePlan'.'Plan1' Input data to data_file                */
    /*     'G:\Hyperion\Automation\Backups\TelePlan\Plan1\Plan1BkupInp.txt';     */
    export database 'TelePlan'.'Plan1' level0 data to data_file
         'G:\Hyperion\Automation\Backups\TelePlan\Plan1\Plan1BkupLv0.txt';
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    /* * Place database in archive mode * */
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    alter database TelePlan.Plan1 begin archive to file 'G:\Hyperion\Automation\Backups\TelePlan\Plan1\files2backup.txt';
    /*Commented out the validate routine*/
    /*alter database TelePlan.Plan1 validate using error_file 'G:\Hyperion\Automation\Backups\TelePlan\Plan1\validate.txt';*/
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    /* * Terminate the Log file output. * */
    /* *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* */
    spool off;
    logout;

    Hi GlennS,
    Thank you so much for the response. I am not versed in MaxL or batch scripts so the easier, the better for me. I am just trying to adjust scripts that consultants wrote during our Hyperion implementation. Below is what I now have for the batch script after adding your suggested changes and is not creating the mulitple files. Would you have a suggestion as to what I have done wrong and how to fix it? Thanks again!
    @ECHO ON
    REM --------------------------------------------------------------------
    REM * *
    REM * File Name: bkupbatch.bat     *
    REM * Created By: Srinivas Uppalapati          *
    REM * Created Date: July 12, 2008 *
    REM * *
    REM * Launches Hyperion MaxL and exports the data               *
    REM * *
    REM --------------------------------------------------------------------
    REM
    REM ---------------------------------------------------------------------*
    REM      SET SCRIPT VARIABLES FOR ESSBASE AND BACKUP DIRECTORIES          *
    REM ---------------------------------------------------------------------*
    SET ESSBACKUPSCRIPTDIR=G:\Hyperion\Automation\Backups\BackupScriptsPlan1
    SET ESSBASEAPPHOME=G:\Hyperion\AnalyticServices\app
    SET ESSBACKUPDIR=G:\Hyperion\Automation\Backups
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    REM *                                             *
    REM *          Deletes existing log file                    *
    REM *                                             *
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    del %ESSBACKUPDIR%\TelePlan\Plan1\Plan1bklog.txt
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    REM *                                             *                                   
    REM *          Executes the backup Maxl script                    *
    REM *                                             *                                                            
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    essmsh.exe %ESSBACKUPSCRIPTDIR%\Plan1BkupStart.msh
    REM ---------------------------------------------------------------------*
    REM      COPY ALL CRITICAL ESSBASE FILES TO THE DATE DIRECTORY          *
    REM ---------------------------------------------------------------------*
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.otl %ESSBACKUPDIR%\TelePlan\Plan1
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.csc %ESSBACKUPDIR%\TelePlan\Plan1
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.rul %ESSBACKUPDIR%\TelePlan\Plan1
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.rep %ESSBACKUPDIR%\TelePlan\Plan1
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.alt %ESSBACKUPDIR%\TelePlan\Plan1
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.zip %ESSBACKUPDIR%\TelePlan\Plan1
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.dbb %ESSBACKUPDIR%\TelePlan\Plan1
    copy %ESSBASEAPPHOME%\TelePlan\Plan1\*.txt %ESSBACKUPDIR%\TelePlan\Plan1
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    REM *                                             *                                   
    REM *          Executes the backup Maxl script                    *
    REM *                                             *                                                            
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    essmsh.exe %ESSBACKUPSCRIPTDIR%\Plan1BkupEnd.msh
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    REM *                                             *                                   
    REM *          Stores Old Backup Copies                *
    REM *                                             *                                                            
    REM *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    del %ESSBACKUPDIR%\TelePlan\Plan1\5_Plan1BkupLv0.txt
    rename %ESSBACKUPDIR%\TelePlan\Plan1\4_Plan1BkupLv0.txt %ESSBACKUPDIR%\TelePlan\Plan1\5_Plan1BkupLv0.txt
    rename %ESSBACKUPDIR%\TelePlan\Plan1\3_Plan1BkupLv0.txt %ESSBACKUPDIR%\TelePlan\Plan1\4_Plan1BkupLv0.txt
    rename %ESSBACKUPDIR%\TelePlan\Plan1\2_Plan1BkupLv0.txt %ESSBACKUPDIR%\TelePlan\Plan1\3_Plan1BkupLv0.txt
    rename %ESSBACKUPDIR%\TelePlan\Plan1\1_Plan1BkupLv0.txt %ESSBACKUPDIR%\TelePlan\Plan1\2_Plan1BkupLv0.txt

  • Automate Application & Essbase Backup

    Hi Gurus
    We have done lots of things on different topics in this forum but one thing which i feel lack is Backup & Recovery Procedures. How can we automate Application & Db Backup for Data forms. Anyone have implemented it or have some clue then pls let it share on this forum.
    Thanks in advance
    SNK

    For the planning application then I would take a backup of the schema/db, this can be automated and done by your dba.
    For essbase then different backup options are outlined in :- http://download.oracle.com/docs/cd/E17236_01/epm.1112/epm_backup_recovery/launch.html
    It all depends on your backup method to how it would be automated.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Essbase Backup

    Is this the correct forum to post Essbase questions?
    We are using Begin Archive and End Archive (EssCmd) to run file system backups on Essbase applications and databases. We've run into a problem ending the archive. We think it is a conflict with a user running a process. We are looking at embedding it in Java with the API and error trapping. Is there a method that works using only Maxl or EssCmd scripts?

    Hi,
    We are using the following steps for back up for around 35 databases in version 7.1
    1.     Login to server.
    2.     Logout All users using LOGOUTALLUSERS command
    3.     Disable Login for each individual Appname in sequential order- using DISABLELOGIN command for all 35 db
    4.     Selecting individual appname and dbname.
    5.     Export data for selected app and db
    6.     Unload Application
    7.     Enable Login for that selected Database.
    But we are facing problem like even though all the users are logged out and by the time it selects a particular app and db and exports, if any other user request access to some other app name or database, Essbase allows the complete read/write access for the same. Due to which we get dbname.esm file getting locked out and corrupted.
    To avoid the users to have any write mode capability, can we use BEGINARCHIVE and ENDARCHIVE commands?
    What I have thought will be the changed steps after we add these 2 commands-
    1. Login to AZ18NT169 server.
    2. Disable Login for each individual Appname in sequential order- using DISABLELOGIN command.
    3. Logout All users using LOGOUTALLUSERS command.
    4. Beginarchive for each db
    5. Selecting individual appname and dbname
    6. Exporting data for that selected app name and dbname.
    7. Unload Application (Stops the specified application)
    8. EndArchive for each db
    9. Enable Login for that selected Database.
    Please let me know if I can achieve my goal of making sure that db is completely in read only mode after we log out all users and if any users request access it will be only read only?
    Appreciate your help in advance.
    Thanks,
    Richa

  • Old Toad's automator workflow to backup Library6.iPhoto database

    Dear Old Toad,
    I just today downloaded your workflow to backup the iPhoto database file, and am having problems making it work.
    When I run it, either from the dock or the script menu, it launches Automator but then closes without doing anything. I don't get a confirmation screen, and no copy of the database is created.
    So I opened it in Automator to see if editing it would help, even though my library is already named iPhoto Library and stored in user/pictures. When I dragged it onto the Automator window, there was only 1 action (Get Specified Finder Items) instead of the 4 that show up in the ReadMe. When I dragged it onto the Automator app to open it, I got nothing.
    I downloaded it via Firefox 3.0.1 and got a 1.1MB zip, and I tried downloading it twice in case it had corrupted in the download, but no change with the second try. Downloaded from here:
    http://web.mac.com/toad.hall/ToadsCellar/ToadsCellar.html
    Running OS 10.4.11, iPhoto 7.1.5, on a G4.
    Something else I can try?
    Thanks,
    Daiya
    Message was edited by: Daiya

    Yes. Run the application like you would use the Save command in other applications, often. Running it again will overwrite the current backup copy with a new backup that will include all changes you've made to your library, new pictures, deletions, slideshows, books, etc.
    I suggested keeping it in the dock so you can quickly run it after any changes you've made to the library. Being in the Dock makes it more convenient than having to go into the Application folder and launching it from there.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Encrypted Essbase Backup

    HI
    Currently we are taking backup of essbase into .dat or .txt file...but both file can be changed. As a result, it will loose the security of the backup. Kindly let me know how can i get secure backup from essbase?
    Thanks

    Text files are not encrypted, regardless of extension, or even no extension.
    Glenn pointed out that the binary files that are Essbase's data on disk are already encrypted.
    If this is a BSO database, you could use DATAEXPORT's bin format to give you a measure of encryption, or at least the inability to read an export file in a text editor and see numbers.
    Have you looked at real encryption tools? A quick search on the web turns up this Pretty Good Privacy page:
    http://www.cryptography.org/getpgp.htm
    I am no cryptologist, to put it mildly, so I think the above is just a starting point.
    Surely your IT department does this on a regular basis with other data types -- perhaps they would be a resource to turn to?
    Regards,
    Cameron Lackpour

  • My Automator script to backup files to encrypted disk image

    Hi there. I have a question regarding Automator and Encrypted disk images. I've put together a workflow that grabs files in my home folder. My home folder is utilizing FileVault. I'm grabbing things like my iphoto library, documents folder and such. On an external usb drive I've created an encrypted disk image about 100GB. My goal is for the automator action to "successfully" mount > copy > unmount the encrypted image.
    As of right now, the script works, but gives an error at the end of the copy, not allowing a successful unmount of the dmg. Is there something I'm doing wrong? I browsed through all the files after copying and they are all there, the folder sizes match up 100%.
    I guess I could just use a program that does this, but, I find it much easier clicking on a shortcut in my dock to run the script and go away for 10 - 15 mins.
    If it would help to view the script, let me know and we'll work something out.
    Thanks

    The popup box says:
    The action "Copy Finder Items" encountered an error. Check the action's properties and try running the workflow again.
    And the Automator workflow log says:
    Can't read directory contents: /Volumes/Backup
    But as I said, clearly it works and reads/writes to the encrypted dmg because all the files are there. What I do is just select all the folders inside the drive first, and delete/empty the trash first before running the action. This is the second step once I know this is working. So that I don't have to manually delete them everytime before running the script.
    So to answer your question, the drive is empty, and the dmg is empty, allowable for a maximum 100GB of storage.
    I think it might be something to do with copying files to an encrypted disk image, but, I can't find any help anywhere on this.
    Thanks

  • Automator workflow for backup (BU3)?

    Hi there,
    I have never used automator, but I would like to create a workflow that allows me to schedule the following actions:
    1.) turn off Norton Anti-Virus auto-protection
    2.) run incremental backups through BU3 onto my idisk and external hard drive
    3.) turn on Norton Anti-Virus auto-protect
    Is anything like that out there or can anyone help me set this up? Thanks.

    I don't believe you can do it the first way.
    However there are at least three ways to do it the second way.
    1) Use System Events GUI scripting exclusively to drive the user interface i.e., selecting menu items and pushing buttons;
    2) Use some of 1) along with Mail's AppleScripting capabilities. GUI scripting would still be needed for Preview as it does not have AppleScript capabilities;
    3) Install the cups-pdf solution called "Virtual Printer" (http://www.macupdate.com/info.php/id/20219) that allows one to create pdf files from anything that can be printed using the print dialog. This would also have to be driven using one or both of GUI scripting and Applescript.
    If you do a lot of PDF printing then I would recommend 3) and generally 1) is less robust than 2). Myself or others on this forum should be able to help with whichever solution you prefer.

  • Essbase backup steps

    Hi,
    We are using the following steps for back up for around 35 databases in version 7.1
    1.     Login to server.
    2.     Logout All users using LOGOUTALLUSERS command
    3.     Disable Login for each individual Appname in sequential order- using DISABLELOGIN command for all 35 db
    4.     Selecting individual appname and dbname.
    5.     Export data for selected app and db
    6.     Unload Application
    7.     Enable Login for that selected Database.
    But we are facing problem like even though all the users are logged out and by the time it selects a particular app and db and exports, if any other user request access to some other app name or database, Essbase allows the complete read/write access for the same. Due to which we get dbname.esm file getting locked out and corrupted.
    To avoid the users to have any write mode capability, can we use BEGINARCHIVE and ENDARCHIVE commands?
    What I have thought will be the changed steps after we add these 2 commands-
    1. Login to AZ18NT169 server.
    2. Disable Login for each individual Appname in sequential order- using DISABLELOGIN command.
    3. Logout All users using LOGOUTALLUSERS command.
    4. Beginarchive for each db
    5. Selecting individual appname and dbname
    6. Exporting data for that selected app name and dbname.
    7. Unload Application (Stops the specified application)
    8. EndArchive for each db
    9. Enable Login for that selected Database.
    Please let me know if I can achieve my goal of making sure that db is completely in read only mode after we log out all users and if any users request access it will be only read only.
    Thanks in advance for your suggestions!
    Regards,
    Richa

    Yes Krish.
    Exactly that is what I thought and hence I have suggested this approach now-
    1. Login to AZ18NT169 server.
    2. Disable Login for each individual Appname in sequential order- using DISABLELOGIN command.
    3. Logout All users using LOGOUTALLUSERS command.
    4. Beginarchive for each db
    5. Selecting individual appname and dbname
    6. Exporting data for that selected app name and dbname.
    7. Unload Application (Stops the specified application)
    8. EndArchive for each db
    9. Enable Login for that selected Database.
    Here i am first disabling login and then logging out all users from all app and db. after that before selecting individual db for export, will do beginArchive (making it read ony), then selecting Dbname, Exporting data, Unloadingapp, EndArchive and then re-enabling login.
    This will be repeated for all databases. Please suggest if BeginArchive and EndArchive for each db will cause any issue?
    Regards,
    Richa

  • Backup Worflow with Automator (using incremental backups)

    How would I go about making a workflow that backs up my HD onto an external HD, replacing newer/changed files?
    Thanks,
    Mason

    Get a backup utility that does scheduled backups. There is no built-in backup facility in OS X except the Restore option of Disk Utility that does only full cloned backups.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    1. Retrospect Desktop (Commercial - not yet universal binary)
    2. Synchronize! Pro X (Commercial)
    3. Synk (Backup, Standard, or Pro)
    4. Deja Vu (Shareware)
    5. PsynchX 2.1.1 and RsyncX 2.1 (Freeware)
    6. Carbon Copy Cloner (Freeware - 3.0 is a Universal Binary)
    7. SuperDuper! (Commercial)
    The following utilities can also be used for backup, but cannot create bootable clones:
    1. Backup (requires a .Mac account with Apple both to get the software and to use it.)
    2. Toast
    3. Impression
    4. arRSync
    Apple's Backup is a full backup tool capable of also backing up across multiple media such as CD/DVD. However, it cannot create bootable backups. It is primarily an "archiving" utility as are the other two.
    Impression and Toast are disk image based backups, only. Particularly useful if you need to backup to CD/DVD across multiple media.
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore. Also read How to Back Up and Restore Your Files.

  • Essbase Backups

    I am writing a script to back up all the available apps. For the Begin archive, endarchive and export command, I need to mention the names of App/DB in the maxl script. Is there a way I can dynamically write the script for all the available applications instead of hardcoding their names in the script?
    Thank you!

    Write the maxl script in a kornshell or bat file, then tokenize the items that you will pass from the driver script
    login $1 $2 on $3;
    alter system load application '$4';
    export database '$4'.'$5' level0 data in columns
    to data_file "'$4.Lev0backup";
    logout;
    and name it 'backup.msh' for instance.
    Then from the driver script for each different app/db you would invoke the maxl shell passing the 'backup.msh' file and the parameters.
    essmsh backup.msh <Userid> <Password> <Server> <Appname> <dbname>
    Message was edited by:
    RobertR

  • Automated ASA Config Backup

    Does anyone know of a way to automatically backup an ASA config using SNMP or some other method?
    Thanks
    Frank

    Yeah, you can back it up via TFTP without an authentication challenge - that's not a problem. You can even build an ACL to limit the IP addresses that can perform a TFTP GET against the ASA (to pull the config). There are a number of scripts and tools that make backups of ASAs & PIXs using TFTP (or you could just modify the script I published depending on your comfort level in Expect)
    The problem I had in my situation is that I couldn't trust the path to the device, and in the case of TFTP it can be vulnerable to a MITM. As you probably already know, once someone gets your device config in its entirety they can plan an attack of the device that is likely to succeed.
    Keeping credentials in a file are not desirable, but out of all the systems used to perform the backup, the host running the script was the one I trusted the most.  There are ways to really secure that using tools (in both Expect and Shell scripts) to convert the credentials to a hash that is decrypted only when the script is run, I just haven't tied that in with my script yet.

  • Dynamically automating all database backups with known filenames.

    I need to know the name of the full database backup, so I can restore to another server. I came up with this basic script for backing up (script 1) but I want to do this dynamically, and began to play with cursors, which did not go so well. The second script
    seems to create an infinite loop or some nasty Cartesian. If anyone can point me in a direction to getting my peanut butter to mix with my chocolate I'd appreciate it.
    FWIW, the end goals are to know the db name and do this in a dynamic way so anytime a db is dropped or added we do not have to remember to update backup jobs. Up till now maintenance plans worked, but now we want to know the backup name so we can restore
    db's to a preprod environment. Any suggestions/guidance/links would be appreciated.
    declare @dbname varchar(100)
    declare @backupdate varchar(25)
    SET @backupdate = convert(varchar(25), GETDATE(), 112)
    declare @backupfilename varchar(150)
    declare @backupSQL varchar(MAX)
    Set @dbname = 'master'
    Set @backupfilename = @dbname + @backupdate + '.bak'
    SET @backupSQL = 'BACKUP DATABASE '+@dbname+' TO DISK = N''\\delos\SQL_Live_Backup\PreProd_BackupRestore\'+@backupfilename+'''
    WITH FORMAT, INIT, NAME = N'''+@backupfilename+''', SKIP, NOREWIND, NOUNLOAD, STATS = 10, CHECKSUM, CONTINUE_AFTER_ERROR'
    EXEC(@backupSQL)
    declare @dbname varchar(100)
    declare @backupdate varchar(25)
    SET @backupdate = convert(varchar(25), GETDATE(), 112)
    declare @backupfilename varchar(150)
    DECLARE db_cursor CURSOR
    FOR SELECT name FROM sys.databases WHERE NAME NOT LIKE 'zz_%' AND [state]=0 AND is_read_only=0 AND user_access in (0,1)
    OPEN db_cursor
    FETCH NEXT FROM db_cursor
    INTO @dbname
    WHILE @@FETCH_STATUS = 0
    BEGIN
    PRINT @dbname + @backupdate + '.bak'
    END
    CLOSE db_cursor;
    DEALLOCATE db_cursor;

    I keep the names of the databases need to be backup in the separate table and then run the query.
    This create creates a folder (name of the database)  and keeps the files for 6 days old IIRW.
    CREATE PROCEDURE [dbo].[sp_DatabasesToBackup1] @LocalBackupPath AS VARCHAR(8000)
    AS
    DECLARE @name AS SYSNAME
    DECLARE @CommandString AS VARCHAR(8000)
    DECLARE @SQL AS VARCHAR(8000)
    DECLARE  @FS SMALLINT
    SET NOCOUNT ON
    CREATE TABLE #t(dbname VARCHAR(8000))
    BEGIN TRY
    ;WITH cte
    AS
    SELECT  [name],ROW_NUMBER() OVER (ORDER BY name) rn
    FROM sysdatabases INNER JOIN
    DatabasesToBackup ON
    sysdatabases.dbid = DatabasesToBackup.dbid
    WHERE  DATABASEPROPERTYEX ( [name] , 'status' )='ONLINE'
    ) INSERT INTO #t SELECT [name] FROM cte 
    ORDER BY rn
    DECLARE sysdatabasesCursor CURSOR FOR
    SELECT dbname FROM #t
    OPEN sysdatabasesCursor
    FETCH NEXT FROM sysdatabasesCursor
    INTO @name
    SELECT  @FS =  @@FETCH_STATUS
    WHILE (@FS <>-1)-- 0 ---=<>-1
    BEGIN
      PRINT 'Start Backup ' + @name + ' database. '
      SET @CommandString = 'IF NOT EXIST "' + @LocalBackupPath + '\' + @name + '" MD "' + @LocalBackupPath + '\' + @name + '"'
      EXEC xp_cmdshell @CommandString
      PRINT 'Create Local Dirctory Complete.'
      SET @SQL = 'BACKUP DATABASE [' + @name + '] TO DISK = N''' + @LocalBackupPath + '\' + @name + '\' + @name + CONVERT(VARCHAR, GETDATE(), 112) + '.bak'' WITH INIT, NOUNLOAD, NAME = N''' + @name + ' backup'', SKIP, STATS = 10, NOFORMAT'
      EXEC(@SQL)
      FETCH NEXT FROM sysdatabasesCursor INTO @name
      SELECT @FS =  @@FETCH_STATUS
      SELECT @@FETCH_STATUS  AS '@@FETCH_STATUS'
      SELECT @FS AS '@FS'
    END
    CLOSE sysdatabasesCursor
    DEALLOCATE sysdatabasesCursor
    END TRY
    BEGIN CATCH
           SELECT ERROR_MESSAGE()
           ---INSERT INTO Errors(ERRMSG,CommandString) SELECT ERROR_MESSAGE(),@CommandString
    END CATCH;
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • Printing Guidance

    Hi all I'm a fairly new transfer into the world of vector graphics and have been given a print assignment with the following instructions. Any clarification on this would be very helpful, in terms of sizing my artboard down and what would be acceptab

  • ECC 6.0 - EHP4 - Client Import

    Dear Experts, This is a reimplementation project. Previous company has installed & configured ECC 6.0 - DEV/QAS systems (ABAP stack only). Now, we want a fresh installation of DEV/QAS servers with ECC 6.0 - EHP4. The management wants to restore all t

  • About the latest version of Mozilla FireFox

    Hi there, if I suspect that my Mozilla Firefox is already outdated. How can I check for the latest version of Mozilla Firefox, and how to upgrade to the latest version? Thanks a million in advance for your sincere help.

  • App reviews are removed (solved - not removed)

    Not sure why this is happening. I downloaded an application and provided a constructive feedback (as opposed to auto-generated 'I love it' messages). I gave 2 stars to the application and took a screenshot when the review was visible on the screen. A

  • Broken Phone and No Idea Why...

    I have an android Samsung Galaxy...not sure of the exact model. Anyway, tonight I posted a picture to Instagram which was successful. I then tried to scroll down to view recent photos and the screen suddenly froze and then began to change to a lighte