You use the iFolder Data Recovery tool to restore a user’s backed-up data.
The iFolder Data Recovery tool is a command line utility that enables you to restore backed-up files, folders, or iFolders for any user. If an administrator has performed regular or incremental file system backups of all iFolder system data on the server, the data can be restored with this tool. iFolder data can be restored in its entirety or even at a granular level like a particular file or a folder. This tool also enables you to restore encrypted iFolders.
The tool provides the following functionality:
Restoration of iFolders, folders, and files
Two methods of data restoration:
Local restore: This method employs a direct copy of data from a temporary location (where the backup is restored) to the desired location, and makes the data available to the end user. This method of restoring data is faster than the Web-based method, because it uses a direct copy. It is also the only method you can use to restore a file that is larger than 1 GB. However, this method cannot be used to restore data to a remote iFolder server.
Web-based restore: This method uses HTTP to transfer the data and metadata from a temporary location to the desired location. This makes it possible to restore data to a remote iFolder server, but it is slower because it uses HTTP to send both data and metadata.
Built-in intelligence to identify method to restore data based on whether the destination is on the same machine or a different one.
It does not decrypt the contents of an encrypted iFolder in the process of restoring an encrypted iFolder.
To successfully use the data recovery tool, use the following guidelines:
You must ensure that iFolder service is stopped while taking file system backups.
The administrator who runs the data recovery tool must have root or equivalent privileges.
The data that needs to be restored must be backed up properly. Any corruption in the backed-up data stops the restore operation.
To use the tool, you must first restore the backed-up data to a temporary location and then you must run the tool from the same place. You must ensure that the restored content retains the same rights or permissions that was assigned when it was backed up and you must ensure that the user wwwrun has access rights on the temporary location.
To perform a restore operation, you need to know the location of the following data:
From the iFolder server data path, you need to know the location of the FlaimSimias files and directories. For instance, FlaimSimias.01, FlaimSimias.lck, FlaimSimias.db, and FlaimSimias.rfl.
Simias.config.
Simias.log4net.
modules directory.
Folder data (the actual file, folder, or iFolder data to be restored)
If the data recovery tool quits with an error during the restore process, re-run the tool and use the retry option to complete the restore process.
To restore a file that is larger than 1 GB in size, you must use the local restore method.
Files are restored from iFolder and its immediate subfolder. The subsequent subfolders cannot be restored.
The data recovery tool is available in /opt/novell/ifolder3/bin. It uses the following syntax:
ifolder-data-recovery <Operation> <Options>
Any path specified using the tool is the absolute path, unless the path is specified by using the relativepath option.
If there is a space in the path or filename, the path or filename must be specified within double quotes.
Operation |
Description |
---|---|
--list |
Lists iFolders owned by the specified user, and gives details such as name, iFolderid, and path (at the time of backup) |
--restore |
Restores the requested data (File/Folder/iFolder) from the specified backup store or location |
--retry |
Resumes the restore operation that failed in the last run |
--help |
Displays help for the operation, options, and usage |
Options |
Description |
---|---|
--path= |
The path of the simias files in the backup store. The simias files must be present in a directory named simias. The path must be the absolute path to the simias directory. |
--backup-admin= |
The login name of the administrator who performed the backup |
--backup-password= |
The password of the Administrator who performed the backup |
--current-admin= |
The administrator login name for current server |
--current-password= |
The password of the current server’s Administrator |
--server-url= |
The URL of the server where data is to be restored |
--user= |
The username or ID of the user for whom the specified operation is to be performed |
--ifolder-id= |
The ID of the iFolder for which the specified operation is to be performed |
--ifolder-path= |
The absolute path (excluding the iFolder name) of the actual data to be restored |
--relative-path= |
The relative path of file or folder to be restored, starting from iFolder name |
--restore-policies |
Overwrites current iFolder policies with the policies of the iFolder from backup |
--usewebaccess |
The mode to use. Does not take any value. |
To display help: ifolder-data-recovery --help
To list iFolders for a specified user: ifolder-data-recovery --list --path <path of simias file in backup store> --backup-admin <admin login name for backup> --backup-password <password of the backup admin> --user=<username or ID of the user>
To restore an iFolder: ifolder-data-recovery --restore --path <path of simias file in backup store> --backup-admin <admin login name for backup> --backup-password <password of the backup admin> --current-admin <admin login name for current server> --current-password <password of the current server’s admin> --server-url=<current ifolder server url> --ifolder-id=<ID of the iFolder for which restore operation is performed> --ifolder-path=<Parent level path for actual data to be restored>
To restore a file or a folder: ifolder-data-recovery --restore --path <path of simias file in backup store> --backup-admin <admin login name for backup> --backup-password <password of the backup admin> --current-admin <admin login name for current server> --current-password <password of the current server’s admin> --server-url=<current ifolder server url> --ifolder-id=<ID of the iFolder for which restore operation is performed> --ifolder-path=<Parent level path for actual data to be restored> --relative-path=<Relative path of file or folder to be restored>
To retry restore operation: ifolder-data-recovery --retry --path <path of simias file in backup store> --backup-admin <admin login name for backup> --backup-password <password of the backup admin> --current-admin <admin login name for current server> --current-password <password of the current server’s admin> --server-url=<current ifolder server url> --ifolder-id=<ID of the iFolder for which restore operation is performed> --ifolder-path=<Parent level path for actual data to be restored> --relative-path=<Relative path of file or folder to be restored>
This section discusses some use case scenarios to help illustrate how to use the data recovery tool. For a list of caveats to be considered while using the tool, see Caveats.
Consider a scenario where a user named Bob wants to restore an iFolder named mydocs. However, Bob does not know the iFolder ID or the exact location of the folder.
To determine the actual location of the iFolder in the database and information such as the number of iFolders or the iFolder ID, the administrator can use the --list command:
ifolder-data-recovery --list –-path <temporary location where database content is restored> --backup-admin=<admin login name> --user=Bob
The output of this command lists all the iFolders, along with details such as the iFolder name, iFolder ID, and the path (the location where the iFolder is stored at).
Files are restored from iFolder and its immediate subfolder. The subsequent subfolders cannot be restored. If you need to restore a folder down the level, ensure parent directory path is present.
Consider a scenario where a user named Bob has lost a folder named mydocs/temp from the mydocs iFolder.
Obtain information such as the user login ID, iFolder name, and subdirectory or file that needs to be restored.
In this example, this would be: Bob (user ID), mydocs (iFolder name), and mydocs/temp (the directory to be restored).
Log in to the Web Admin console and click User > Bob > mydocs.
Under the iFolder details you can find the iFolder path in the path field.
The path can also be determined by using the --list command. For example, the iFolder path might be /var/simias/data/simias/SimiasFiles/09/9b581fe2-e4d8-4178-8d8a-699db8118f13/mydocs
Using a backup application, restore the iFolder database content to a temporary location, such as /tmp/olddatabase/simias.
From the backup, restore the actual iFolder content to the temporary location. For example, you would restore the actual iFolder content /var/simias/data/simias/SimiasFiles/09/9b581fe2-e4d8-4178-8d8a-699db8118f13/mydocs to a temporary location, such as /tmp/iFolderdata/mydocs.
Run the data recovery tool with the following options:
ifolder-data-recovery --restore --path <temporary location where database content is restored> --backup-admin=admin --backup-password <password of the backup admin> --current-admin=admin --current-password <password of the current server’s admin> --server-url=http://100.99.101.01 --ifolder-id= 9b581fe2-e4d8-4178-8d8a-699db8118f13 --ifolder-path=<temporary location where ifolder content is restored> --relative-path=mydocs/temp
Consider a scenario where a user named Bob has lost an iFolder named mydocs.
Obtain information such as the user login ID and the name of the iFolder that needs to be restored.
In this example, this would be Bob (user ID) and mydocs (iFolder name).
Using a backup application, restore the iFolder database content to a temporary location, such as /tmp/olddatabase.
Run the list command to get the actual iFolder location:
/ifolder-data-recovery --list --path <temporary location where database content is restored> --backup-admin=admin –user=Bob
Determine the actual iFolder content location from the output of the command in Step 3 and restore the iFolder from backup to a temporary location, such as /tmp/iFolderdata/mydocs.
Run the data recovery tool with the following options:
ifolder-data-recovery --restore --path <temporary location where database content is restored> --backup-admin=admin --backup-password <password of the backup admin> --current-admin=admin --current-password <password of the current server’s admin> --server-url=http://100.99.101.01 --ifolder-id=9b581fe2-e4d8-4178-8d8a-699db8118f13 --ifolder-path=<temporary location where ifolder content is restored>
When you use the data recovery tool to restore encrypted iFolders, the iFolders might not synchronize automatically after restoration and might display a message indicating Incomplete Synchronization.
The Encrypted iFolder Has the Same Passphrase and Recovery Agent as the Current Server
The Encrypted iFolder Has a Different Passphrase and the Same Recovery Agent as the Current Server
The Encrypted iFolder Has a Different Recovery Agent and the Same Passphrase as the Current Server
The Encrypted iFolder Has an Unknown Recovery Agent and an Unknown Passphrase
If the restored encrypted iFolder has the same passphrase and Recovery agent as the current iFolder server, no further action is needed. After the restoration, iFolder starts synchronization as expected. However, for any Merge operation, you must resolve conflicts. For more information on resolving conflicts, see Resolving File Conflicts
in the Novell iFolder 3.9.2 Cross-Platform User Guide.
If the restored encrypted iFolder has a different passphrase but the same Recovery agent as the current iFolder server, then post restore, iFolder reports Incomplete Synchronization after the restoration. To have synchronization work as expected, you need to change the passphrase.
Access the Change Passphrase dialog box.
For more information, see Changing the Passphrase
in the Novell iFolder 3.9.2 Cross-Platform User Guide.
Specify the old passphrase in the Enter passphrase field.
Specify the passphrase for the current iFolder server in both the Enter new and Retype passphrase fields.
Select the current Recovery agent and perform the change passphrase operation.
If the restored encrypted iFolder has same passphrase as the current server but has a different Recovery agent, you need to change the Recovery agent.
Access the Change Passphrase dialog box.
For more information, see Changing the Passphrase
in the Novell iFolder 3.9.2 Cross-Platform User Guide.
Specify the old passphrase in Enter passphrase field.
Specify the passphrase for the current iFolder server in both the Enter new and Retype passphrase fields.
Select the current Recovery agent and perform the change passphrase operation.
If the restored encrypted iFolder has the same Recovery agent as the current server, but has a different passphrase and you don’t know what the passphrase is, encrypted iFolders might not synchronize automatically after restoration and might display a message indicating Incomplete Synchronization.
If this happens, use the Forgot Passphrase option with the same Recovery agent and use the current server passphrase as new passphrase. For more information, see Recovering an Encrypted iFolder
in the Novell iFolder 3.9.2 Cross-Platform User Guide.
If the restored encrypted iFolder has a different Recovery agent but has the same passphrase as the current server, and both the Recovery agent and passphrase are known, you must change both the passphrase and the Recovery agent:
Access the Change Passphrase dialog box.
For more information, see Changing the Passphrase
in the Novell iFolder 3.9.2 Cross-Platform User Guide.
Specify the old passphrase in Enter passphrase field.
Specify the passphrase for the current iFolder server in both the Enter new and Retype passphrase fields.
Select the current Recovery agent and perform the change passphrase operation.
If the restored encrypted iFolder has a Recovery agent and passphrase that are different from the current server and both these values are unknown, the restored iFolder cannot be recovered.
The restore tool logs are located at: <simias log location>/ifrecovery/
The table given below summarizes the different types of log files:
Table 10-1 iFolder Data Recovery Tool Logs
Log Files |
Description |
---|---|
<ifolderid>.failed |
Contains information about all the entries that failed during the restore/retry operations. |
debug.log |
Contains all information pertaining to the execution of the tool. |
<ifolderid>.notfound |
Contains information about all the entries not found in the backup store during the restore/retry operations. |
<ifolderid>.xml |
Contains details such as the result of the last operation (successful/ failed), member details, and the relative path for the type of restore operation performed. |
<ifolderid>.failedworking |
Contains information about failed entries during a retry operation. |
NOTE:If there is any failure in the last run of a particular iFolder restore operation, subsequent restore operation requests prompt for a retry. To perform a new restore operation, you must delete all files related to the iFolder ID from the log location.
Consider the following caveats when you use the data recovery tool:
The tool fails and exits gracefully if Apache is restarted. To continue the restore operation, use the --retry option.
If an iFolder level restore operation fails (the tool exits in between operations), the iFolder might be shared with the administrative user of the system. In such a case, you should delete the partially restored iFolder, remove the old backup, remove all corresponding logs from the log location (logs such as <ifolderid>.xml, <ifolderid>.failed, <ifolderid>.notfound, <ifolderid>.working), and start --restore operation with a fresh backup.
If you do a full iFolder restore, the tool restores/overwrites all the files and folders inside the iFolder that is to be restored. For example, assume that an iFolder has 10 files. You have lost 3 out of 10 files.If you restore the complete iFolder, all 10 files are restored instead of just the missing 3 files.
If a filename is changed after the backup is taken and the file exists on the server at the time of the restore, only the content is restored and filename remains unchanged. However, if the file doesn't exist on the server at the time of the restore, the file is restored with the filename it had before the rename operation. For example, assume that a file named a.txt is renamed to b.txt after a backup is taken. If the b.txt file exists on the server during a restore, only the contents of the file are restored and the file name of the restored file remains as b.txt. However, if the b.txt file does not exist on the server, the file is restored as a.txt.
If the tool does not start, run the ps -ef | grep mono command. Verify if a process is running on port 8086. If a process is running on port 8086, kill the running process and restart the tool. If a process is not running, make sure that the backup is not corrupted.