Volume-4, Issue-4, August-2014, ISSN No.: 2250-0758 International Journal of Engineering and Management Research Available at: www.ijemr.net Page Number: 290-293

Efficient Method for Backup and Restore of Data using Compression Techniques

C. M. Manasa1, Prof. Kumarswamy. H2 1,2Computer Science and Engineering P.G Department, INDIA

ABSTRACT As a number of service providers such as Drop [2] and In the present decade smart phones are becoming Zumo-drive [3] offer online storage services. In the present part of most of the people lives because of its multi paper we try to purpose hear a solution to save our data by functionality, out of which the storage of valuable data by keeping backup online and minimized the time and storage saving size of memory is one of the most important function. space while backup the data by applying compression Storage function can be done with the help of internet techniques and then back up the data. It helps to increase connectivity. Most of the data stored in smart phones is important then the physical device. This paper is bandwidth and also performance of the data. concentrated on safety backing up of important data in the storage medium with the help of compression and restoring II. PRIOR APPROACH the same data. Here an effort is made to compress the data using RLE and Huffman algorithms. Using these techniques A. Android storage space can be utilized well and performance is Android is the most booming mobile OS in present enhanced. days. Google used Version 2.6 to develop the android and also anyone can develop Android on their Keywords— RLE, Huffman, backup and restore. hardware. The architecture of the android is made up of several levels of software. Kernel is the first level, and it I. INTRODUCTION forms the base. Kernel includes all the functionalities such as memory management programs, security settings, Today, Smartphone is common for various classes of power management software and also hardware drivers. people. As Smartphone having various functionality with The next level of software is an android library which internet facility user saves their not only contacts but also helps to handle different kind of data. In this layer Java all valuable personal data with high security as an example programming language is used to develop android password, ATM pin, PAN card no etc. Survey conducted applications and it also includes Dalvik virtual machine to by Lifestyle Services Group says that one third of run applications as its own process. Smartphone owners give more value to the data stored on The advantages of Dalvik virtual machines are their handset, than the actual handset itself [1]. 1. Applications are independent. It is important to protect the data to prevent it 2. No interruptions between the applications. from hacking, misplacing and destruction of the device. 3. Simplified memory management [4]. We can achieve the security, by making copies of data The next level of software is application framework. called “Backup” retrieve the same data back from storage This includes functionalities such as resource allocation, called “Restore”. Various backups and restore data telephone applications and keeping track of physical techniques are available in market such as cloud storage location of device etc. Developers can directly access this services and application software. Backup can be done in framework. The next level of software is applications what various forms as online backup, offline backup, full actually we can view on the device screen. backup and incremental backup. Initially this paper tells about the problems faced commonly, while doing backup process. Such as, huge amount of time as file size is increased, failure of internet connection, limited storage space and battery, we can use cloud storage services and database services to store data.

290

compression techniques .in this paper we compress the data using RLE and Huffman algorithms. A. Login Module In this module, fill all the personal details of the user and save it in the server database. Now user gets user id and the password. With the help of these users can always login to the application which is installed in device. This is the first step to backup the data.

Figure 1: Architecture of android

B. Backup and restore The number of smart phone users and mobile applications are growing rapidly. Though Smartphone‟s are expected to have PC-like functionality, hardware resources such as CPU‟s, memory and batteries are still limited. Since all personal valuable data is included in the Figure 2: User Login Window Smartphone we need to backup the data .whenever the device is lost the data which has been made backup is [6] B. Backup and Restore Module restored. This module is used to backup the data. Functional Backups can be classified in several types; it is possible options by the means of buttons are provided at this stage to distinguish the data repository model in full backups vs. to the user such as backup and restore. User can click on incremental backups, data can be stored in a file-based or a backup to make copies of data or restore to retrieve the device-based style, and the data repository management same data back. can be classified as on-line vs. off-line; those approaches can be combined in different ways, according to accessibility, security and cost needs. Many service providers provide storage place to backup the data.eg cloud storage, databases, zumodrives, dropboxes etc. Making backups on external memory devices, such as on Secure Digital (SD) cards or on laptop disks, suffers from the same risks of failure or loss. The drawbacks of the existing backup and restore methods are considered and it has been overcome. Such as where Compression techniques are not implemented so efficient memory management is not satisfied. This can be achieved using Figure 3: Application Window with user Options compression algorithms. Backup and restore is not made with the help of web services. Since almost all the android After this the user will get the choice window in that Smartphone‟s are connected to the internet this can be various applications need to be backup will be present. achieved. They can select call logs, calendar, messages or contacts. C. Text compression algorithms One application choice is provided such that all the data There are many lossless text compression can be made backup once that is backup all. algorithms. There are two techniques in text compression such as statistical compression technique and dictionary based compression techniques [5]. Compression is the technique data is represented in the compact form to save memory space .The following are the some of the statistical compression techniques such as SHANNON FANO CODING, ARITHMETIC CODING, ADAPTIVE HUFFMAN CODING.

III. OUR APPROACH

In this paper we try to propose solution to save Figure 4: Selecting Back up Window our data by keeping backup online and minimised the time and storage space while doing backup of data by applying

291

We need to again login for restoring the data a student in a class on information theory at MIT in 1950. After successfully login open the same window as fig no 2. It is a more successful method used for text compression. Just by clicking the button “Restore” window with a list of Huffman‟s idea is to replace fixed-length codes (such as data wish to restore is open select it and click on restore. ASCII) by variable-length codes, assigning shorter Data is restored from user account to the device. Again codeword‟s to the more frequently occurring symbols and using the created operation in interactive language and my thus decreasing the overall length of the data. When using SQL we can easily restore data from database to the variable-length codeword‟s, it is desirable to create a device. (uniquely decipherable) prefix-code, avoiding the need for a separator to determine codeword boundaries. Huffman coding creates such a code. These algorithms employ a variable bit probabilistic coding method. Huffman uses bottom-up approach The Huffman algorithm is simple and can be described in terms of creating a Huffman code tree. The procedure for building this tree is: 1. Start with a list of free nodes, where each node corresponds to a symbol in the alphabet. 2. Select two free nodes with the lowest weight from the list. 3. Create a parent node for these two nodes selected and

Figure 5: Restore Window the weight is equal to the weight of the sum of two child nodes. In addition to this PHP module is important to run the 4. Remove the two child nodes from the list and the front end of this project. It provides interactive pages. parent node is added to the list of free nodes. C. PHP Module 5. Repeat the process starting from step-2 until only a In this module we have to create a PHP for interaction single tree remains. between application and server. This module helps to take After building the Huffman tree, the algorithm backup of data and restore the same. For taking backup creates a prefix code for each symbol from the from the device and another query for restoring from the alphabet simply by traversing the binary tree from the server write the query in SQL format. The queries such as root to the node, which corresponds to the symbol. It “select * from calendar” etc helps to view respective tables assigns 0 for a left branch and 1 for a right branch. which are created in the database. The algorithm presented above is called as a semi D. Compression Module adaptive or semi-static Huffman coding as it requires 1. Run length encoding technique(RLE): knowledge of frequencies for each symbol from One of the simplest compression techniques known as alphabet. Along with the compressed output, the the Run-Length Encoding (RLE) is created especially for Huffman tree with the Huffman codes for symbols or data with strings of repeated symbols (the length of the just the frequencies of symbols which are used to string is called a run). The main idea behind this is to create the Huffman tree must be stored. This encode repeated symbols as a pair: the length of the string information is needed during the decoding process and and the symbol. For example, the string it is placed in the header of the compressed file. „abbaaaaabaabbbaa‟ of length 16 bytes (characters) is To select which algorithm to be used for the represented as 7 integers plus 7 characters, which can be compression of the data a separate window with the easily encoded on 14 bytes (as for button is provided user can select either of the two example„1a2b5a1b2a3b2a‟). The biggest problem with buttons according to the nature of the text. If the data RLE is that in the worst case the size of output data can be is of repetitive text they can click on button that works two times more than the size of input data.in the present RLE algorithm. If the data is non repetitive they can paper we propose to use RLE compression with a new click on the button that works Huffman algorithm. as approach to overcome this drawback as keep it text as it is shown in the following fig. when text is not repetitive. This can also be overcome by implementing Huffman algorithm where the lengths and the strings are separately encoded. On contrast, the sequence “efficient” when compressed yields “1e2f1i1c1i1e1n1t”. In this case, a negative compression gain of (9-16)/9 which equals -78% can be calculated and the reason of this large negative gain is that the sequence has little character repetition [1] 2. Huffman coding: The Huffman coding algorithm [5] is named after its inventor, David Huffman, who developed this algorithm as 292

in android”, International Conference on Communication Systems and Network Technologies. 2013. DOI 10.1109/CSNT.2013.148, p. 693. [2] http://www.dropbox.com. [3] http://www.zumodrive.com. [4] Kavitha Sharma, “Android in Opposition to iPhone”. International Journal on Computer Science and Engineering. Vol. 3 No.5 May 201, p. 1965. [5] Senthil S, Robert L. “A Comparative Study of Text compression Algorithms” International Journal of Wisdom based Computing, Vol.I (3), Dec 2011, p. 68. [6] Pawade P. P and Kathalkar A. A. “Android based Server for Sharing backup and Restoring Data”. Journal of Data Mining and Knowledge Discovery. ISSN: 2229-6662 & ISSN: 2229-6670, Vol-3, Issu I, 2012, P, 36. [7] http://www.bioinfo.in/contents.php?id=42 [8] “RLE Compression” Retreved from http://en.kioskea.net/content/vedio/comping.php3. [9] http://www.androidfeeder.com. [10]

http://www.openmobilealliance.org/tech/affiliates/sy Figure 6: Window showing algorithms to select for ncml/syncmlindex.html. compression

IV. RESULT AND CONCLUSION

In this paper the two algorithms are used to backup and restore the data. The disadvantage of the RLE algorithm has been overcome with the help of negative gaining. Huffman algorithm helps to encode each pair of the characters for the purpose of backup .Advantages gained by implementing these compression algorithms are the time taken to backup large file is decreased, Memory management efficiency is increased, Bandwidth is decreased. The analysis is given with graph

Figure 7: Compression of RLA and Huffman Coding

REFERENCES

[1] Medhavi S. Shriwas, Neetesh Gupta, and Amit Sinhal, “Efficient method for backup and restore data 293 Copyright © 2011-14. Vandana Publications. All Rights Reserved.