- Back to Home »
- Code Back up Strategy for Development Work Repositories
Posted by :
Arjun Lagisetty
Thursday, October 20, 2016
Problem:
Have you ever had a problem when you accidentally changed something in an interface and you forgot what was changed. You wished you had a copy of yesterday's interface so you can restore from it or at the least compare the current interface to previous day's copy.ODI developers typically use inconsistently internal versioning system to save versions of the code. All these versions are stored the master repository in blob format and litter the repository after a while. This method is also inconsistent, a developer might save an interface but he would have versioned data store used in that interface. Making copies of the objects is even more disastrous, it will make the repository horribly unreadable. Relying on DB backups will mean restore process is all or none. You cannot individually choose which objects to restore. Given these challenges we designed a process which does not involve developers intervention to backup the code nightly.
Solution:
I developed a package to export object by object in the development work repository for the following objects. This code is hosted here. This is scheduled every night. This process backs up the objects to an archive file and retains them for 28 days.Note:
- This code contains some Hard-coded values for directories. I am yet to make the code more parameter driven. Due to lack of time I am publishing the code as is. You need to make changes to the procedure named "PROC_OBJECT_BACKUP"
- This procedure is written for windows and uses 7zip to archive.
- Objects are created in the following format <Prefix>_<Object_ID>.xml. There was some error while using object names in the file names.
- This uses Sunopsis memory engine's default physical schema.
Object Type
|
Child Objects Yes/No
|
Prefix
|
PROJECT
|
No Child objects
|
PROJ
|
INTERFACES
|
With Child Objects
|
POP
|
PROCEDURES
|
With Child Objects
|
TRT
|
PACKAGES
|
No Child Objects
|
PACK
|
VARIABLES
|
With Child Objects
|
VAR
|
USER FUNCTIONS
|
With Child Objects
|
UFUNC
|
MODELS
|
No Child Objects
|
MOD
|
SUB-MODELS
|
No Child Objects
|
SMOD
|
DATASTORE
|
With Child Objects
|
TAB
|
Potential uses:
- These process can be used to restore the code if some developers accidentally corrupts the code.
- We can modify this process to only extract changed objects nightly and check them into a version control system.
- We can modify this process to extract objects based on tag for exporting for migration to another environment.
Excellent post. I really enjoy reading and also appreciate your work. This concept is a good way to enhance knowledge. Keep sharing this kind of articles, Thank you. Big Data Services
ReplyDeleteThis article contains a lot of valuable info. I am amazed by the quality of the info and also it is a beneficial article for us, Thanks for share it.Hire A Professional Lottery Hacker in Usa
ReplyDelete