Skip to main content

Backup and restore in SAS 9.4

In SAS 9.4, we use Deployment Backup and Recovery tool to take backup. I know the tool name sounds complex but believe me it's not. SAS recommends to consider the below points before taking backup.


  • Do full backups regularly
  • If you are going to make any changes in config file or any major changes, then do backup before and after change. 
  • Make sure the backup directory is reachable.


What do you backup?
In SAS 9.4, you do backup for:


  • Metadata repository
  • SAS Content Server
  • SAS Web Infrastructure Platform Data Server PostgresSQL databases
  • Configuration directory


In above list, metadata repository and configuration directory are pretty straight forward. You deal with them everyday. What is SAS Content Server? I know this sounds alien. In SAS Content server we have metadata objects like contents of SAS Information Delivery Portal, report definitions, report dependant files (PDF, image and other contents. You can see those contents in SAS Management Console Folders tab, My Folder -> Data.

What should you know about Deployment Backup and Recovery tool?
From the name it is clear that you are going to use this tool for backup and recovery process in SAS 9.4 environment. This is not a client tools like SAS Management Console, so you don't have GUI for this tool. It is a command line utility, (ie) you use Windows Command Prompt (cmd) in Windows Server and terminal (Putty if you are connected via SSH) in Linux Server. You can take backup and restore just by providing the command. However for running this command you need to check whether Deployment Agent process is running. We call these commands as Batch Commands. Using the commands you can backup any of the SAS content I mentioned in above section. You can get list of commands from SAS Support Website.

Metadata Server backup utility tools is used by Deployment Backup and Recovery tool for Metadata Server backup. You can see the Metadata Server backup utility tool in SAS Management Console. So for metadata server, you can do backup directly using Metadata Server backup utility tool in SAS Management Console instead of Deployment Backup and Recovery tool.

Files backed up by Metadata Server Backup utility in MetadataServer directory
Where will the backup files get stored?
For non-cluster environment:
It is necessary for SAS Admins to be aware of the backup location. The default backup location is base-config-directory/Lev1/Backup/Vault (not for  SAS Server backup). This directory automatically get created when first backup is done.

I already mentioned Metadata Server backup is done by Metadata Server backup utility. You can specify the location in Metadata Server backup utility. So the backup files will be get stored in the location you configured in Metadata Server backup utility. By default it get stored in base-config-directory/Lev1/SASMeta/MetadataServer/Backup

For cluster environment:
For cluster environment you need to provide a centralized backup location. All nodes of the cluster should be able to write to that location. The backup location can be specified using SAS Deployment Wizard. You can change the backup location using sas-update-backup-config command.

Can I do backup using OS commands?
Of-course you can do. But make sure that you pause metadata server to OFFLINE state. In end of the day, SAS contents are just files in OS. So you can copy and paste it in the backup location by OS commands. You have already learned the default location of backup in previous section.

Comments

Popular posts from this blog

How to create library for Oracle in SAS?

In this article, you will get details about creating a new library using SAS Management Console. Here, I have provided the procedure for creating library for Oracle database. However, the steps will be same for other databases like SQL server, Teradata etc.     Creating connection to Oracle database: To create library, you must first create a connection to Oracle database in your host machine. Host machine is the physical location where your SAS platform is installed. Details like Oracle database hostname/IP address and DSN/SID name is needed. Those details should be entered in tsnnames.ora file. For more details check this article Creating library in SAS Management Console: The steps for creating library for Oracle using SAS Management Console (SMC) can used for other database like SQL Server, My SQL etc. New library wizard: Expand Data Library Manager plug-in, right click on the Libraries and click New Library to start library wizard.  You will be asked

SAS - CLI error trying to establish connection

Issue: User asked me to make a database connectivity to SQL Server. They provided following details SQL server hostname and ip address Database/DSN name Username Password I made entry in ODBC.ini file. You know, SQL Server entries were made in ODBC.ini and Oracle entries were made in TNS.ora file. Everything went fine, took back up of odbc.ini, made entry and saved the file. So to test this connection I ran the libname statement in SAS Enterprise Guide 6.1. It throwed following error. Error Message: My DB team showed that they are able to login   14 GOPTIONS ACCESSIBLE; 15 LIBNAME test ODBC DATASRC=SGE_DS SCHEMA=VST USER=sales PASSWORD=XXXXXXXXX; ERROR: CLI error trying to establish connection: [SAS/ACCESS to SQL Server][ODBC SQL Server Legacy Driver][SQL Server]Login failed for user 'sales'. Solution: First I suspected that Login failed for user 'sales' meant the password provided by DB team was wrong. They responded that they were able to login wi

Insufficient authorization to access PIPE error in SAS EG

Issue: When I tried to run SAS code in SAS Enterprise Guide it throws following errors: ERROR: Insufficient authorization to access PIPE. ERROR: Error in the FILENAME statement. Screenshot of error: Solution: This error occurs when you try to run OS commands in SAS code. To run the OS commands in SAS code you need to enable XCMD option. You check it in SAS Management Console by following below steps.   Open SMC -> Expand Servers -> Expand   In SASApp , expand Logical Workspace Server -> right click on Workspace Server. Click properties -> option tab -> advanced options -> launch properties. Check whether Allow XCMD is checked. The issue arises if the Allow XCMD is not checked. In above image, Allow XCMD option is not checked. It should be checked to run OS commands from SAS code. In Unix /Linux machines, this XCMD option can be enabled by using system option XCMD in sasv9 config file or workspaceserver.sh script file. Us