Recovers data marked for deletion, if it has not been permanently deleted by an administrator.
unmarktotal = gd_unmarkfordeletion(ID)
unmarktotal = gd_unmarkfordeletion(IDs)
unmarktotal = gd_unmarkfordeletion(ID) takes an ID string and unmarks the corresponding file, variable or datagroup so it is no longer marked for deletion from the archive. This is a safety measure to recover data that was mistakenly marked for deletion. This function is only applicable for data that has not already been permanently deleted from the archive by an administrator. The function returns 1 if successful or 0 if failed, in which case the reason is displayed in a warning message (for example the ID does not exist). If data is successfully unmarked it is visible again to gd_query, gd_retrieve and other Database Toolbox functions.
unmarktotal = gd_unmarkfordeletion(IDs) is similar but takes a cell of ID strings and unmarks the corresponding files, variables and datagroups so they are no longer marked for deletion from the archive. The function returns unmarktotal, the total number of IDs successfully unmarked for deletion, and displays warning messages for those that were unsuccessful.
Unmark a single file so that it is no longer eligible for deletion from the archive.
ID = gd_archive('C:\file.dat');
gd_markfordeletion(ID);
unmarktotal = gd_unmarkfordeletion(ID)
unmarktotal =
1
Query variable metadata that has been marked for deletion, and then unmark the corresponding variables so that they are no longer eligible for deletion from the archive.
q = 'standard.archiveDate > 2004-12-01 & a.b < -500';
qresults = gd_querydeleted(q, 'varmeta');
for i=1:size(qresults,2)
IDs{i} = qresults{i}.standard.ID;
end
unmarktotal = gd_unmarkfordeletion(IDs)
unmarktotal =
5
Only the owner of the data (the person who archived it) can unmark it for deletion.
If the marked data has been permanently deleted from the archive by an administrator it cannot be recovered.
A valid proxy certificate is required (see gd_createproxy from the Geodise Compute Toolbox).
gd_markfordeletion, gd_querydeleted, gd_createproxy
Copyright © 2007, The Geodise Project, University of Southampton