Before any new software installation, it is recommended to backup the software and config directory in SAS. We usually do this using rsync command in our environment. Below is the command I used to backup the software and config files.
Compute Tier Backup:
- rsync -arA /sas/software /backup
- rsync -arA /sas/conifg /backup
Run the above command using ROOT user. You may get below error if you run this command using non-root user:
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]
I am using rsync utility which is available in many Unix/Linux flavors.The a option will preserve the permissions, A option will preserve ACL and r option will recursively backup all the sub-directories.
While doing backup for sas-config-directory, metadata server must be STOPPED. For sas-software-directory it is not necessary to stop metadata server. So backup the sas-software-directory first and stop the metadata server and backup sas-config-directory. By this way you can save downtime.
To check whether rsync is successful, run below command
[root@localhost ~]# echo $?
0
If the output is 0 then it is success. If it is greater than 0 then you have some errors.
Web Tier Backup
- rsync -arA /sas/software /backup
- rsync -arA /sas/conifg /backup
The commands are same as above. But if you want to backup in different storage/computer you can use ssh command like below.
- rsync -arAh ssh --progress /sas/software root@198.176.189.437:/backup
- rsync -arAh ssh --progress /sas/conifg root@198.176.189.437:/backup
Comments
Post a Comment