About
The reason for making a backup is so that in the event of data loss or corruption it is possible to restore the data from the backup.
Restoration is Part of Backup Setup
Restoring data is actually part of setting up a backup. It is an opportunity to test that the backup has preserved the data which will be required in the even that the original is no longer available. Therefore, the restoration of files should be part of your backup testing and setup procedure.
How Do You Access the Backup During a Restore?
The consideration of how files will be restored is an important step when planing your backup system. Various factors such as 'is the backup to made to local media' should be taken into consideration. Once the way in which the files are backed up has been established, restoring them should be quite simple.
Restoring files
Restoring files may be as simple as coping them from one directory to another. Attentively, the files and or directory structure may be resorted using restore assistant.
Your organization may have documented procedures outlining the step by step instructions for restoring files or directory structures. This information may be outlined in your organizations backup policy.
Another possibility is that you are simply required to contact your system administrator, backup operator, restore center or backup company for assistance with the restoration of your files or directory structure.
The way LBackup Stores Backups
LBackup stores the backup as a snap-shot tree.
- A backup in progress will probably be labeled 'Section.inprogress'
- The most recently completed backup snap-shot will probably be labeled 'Section.0'
- The next most recently completed backup snap-shot will probably be labeled 'Section.1'
- etc…
Navigating the Backup Tree
LBackup includes a tool to assist with navigation of the backup tree. The command '/usr/local/sbin/lcd' allows you to move forward and backwards though snapshots while you remain in the same relative directory if it exists. Refer to the lcd configuration page for setup instructions.
Restoring a Single File or Directory to your Home Directory
Please note this is simply a guide. The instructions below should not be considered best practice. They are simply provided to assist you with understanding of a possible restore procedure.
This is a very simple example of how to use the command line to restore a file to your home directory. The permissions and meta data on some systems may require different steps. This procedure also makes the assumption that you have read access to the files which have been backed up.
- 'ls -l /path_to_backup/Section.0/path_to_file/my_file_to_restore.extension'
- 'cp -r /path_to_backup/Section.0/path_to_file/my_file_to_restore.extension ~/'
- 'ls -l ~/my_file_which_has_just_been_restored.extension'
Meta Data Preservation
During a restore it may be necessary to preserve various meta data. Because, rsync is the back end backup engine for LBackup, it should be possible to use rsync to restore the files to the system they were backed up from. Detailed instructions regarding the use of rsync are available from the rsync home page.
Network Restore
Keep in mind that if you are restoring files across a network over an encrypted channel such as SSH and you have installed ssh wrapper scripts to protect the backup client system, you may need to temporary disable these restrictions by disabling ssh-keys. This is because the purpose of these restricted keys is to restrict the operations such as copying files to the backup client system. After all copying files to the backup client is a restore. This will ultimately depend on how access to your backup clients has been configured.