Restore both active AND inactive files

opeth

ADSM.ORG Member
Joined
Feb 3, 2016
Messages
81
Reaction score
1
Points
0
PREDATAR Control23

All, I have a situation where I need to restore all active and inactive files for a number of folders that are in permenant retention. I am unsure if there is a good/easy way to do this. Anyone ever had to do this? Any ideas?
 
PREDATAR Control23

You can't do it. If you specify -inactive, it will restore the active file if it exist, for deleted files, it will restore the most recent inactive.

Here, I have 3 version of this file:
Code:
  Size  Backup Date  Mgmt Class  A/I File
  ----  -----------  ----------  --- ----
  8,761  B  07/26/2017 10:28:21  DEFAULT  A  \\lanteigne\c$\test\test1.txt
  8,761  B  07/26/2017 10:26:19  DEFAULT  I  \\lanteigne\c$\test\test1.txt
  8,761  B  07/26/2017 10:26:30  DEFAULT  I  \\lanteigne\c$\test\test1.txt

If I restore using: dsmc restore c:\test\test1.txt -inactive It restores 1 file:

Code:
Restoring  8,761 \\lanteigne\c$\test\test1.txt [Done]
Restore processing finished.
Total number of objects restored:  1
Total number of objects failed:  0
Total number of bytes transferred:  8.77 KB
Data transfer time:  0.02 sec
Network data transfer rate:  407.53 KB/sec
Aggregate data transfer rate:  3.78 KB/sec
Elapsed processing time:  00:00:00


It doesn't restore all the files because if it did, it would just keep overwriting them until it restores the last one. For that reason, it restores the most recent version.
 
PREDATAR Control23

Hi,
try the "-latest" option

Latest
Use the latest option to restore the most recent backup version of a file, even if
the backup is inactive.
Examples
Command line:
dsmc restore c:\devel\projecta\ -latest

Harry

EDIT: sorry, misread the question - if you need to restore ALL the active/inactive versions of ONE file then this does not help - problem is you would need to rename the versions to prevent file being overwritten (as marclant pointed out) - which TSM cannot do by itself
 
PREDATAR Control23

Yea I know out of the box this wont work, just wondering if there is a workaround to possibly rename the file with the date it was marked inactive or something.
Guess not.

Related question, is there a way to restore all inactive files (not versions) that don't currently have a active version? (deleted files that don't have an active version with same name) with dsmc restore?
 
PREDATAR Control23

As Harry and marclant said, it is not possible to do restore in one pass. Restore files one-by-one and renaming them as you go along.
 
PREDATAR Control23

Right I understand, might be able to do some powershell magic and script it, but see my second question above... im doubting that is possible either but just wanted to ask the community here before I jump into a ton of work
 
PREDATAR Control23

dsmc restore c:\test\* -inactive <-------this for example, wont JUST grab the latest inactive files that don't have a active version, right?
 
PREDATAR Control23

dsmc restore c:\test\* -inactive <-------this for example, wont JUST grab the latest inactive files that don't have a active version, right?
It will grab the active for files that have an active version and the latest inactive for files that do not have an active. If you look at my example, I had an active and it restored it.
 
PREDATAR Control23

It will grab the active for files that have an active version and the latest inactive for files that do not have an active. <---THAT is what I was looking for. That will work and saves me some headache
 
PREDATAR Control23

Sorry, you should use -latest for that. Here's from the help on inactive:
upload_2017-7-27_10-25-46.png
 
Top