In this topic we assume you've already made the changes on your GN4 schemas related to the storage of the binary files in the file system, and now you want to effectively move old data from database to the file system.
The procedure description follows:
To export all binary files from your database to the volumes
Paste this search condition into a new Notepad window:
<SearchConditions
xmlns="http://www.teradp.com/schemas/GN4/1/SearchConditions.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ObjectTypeName="object">
<SearchNode xmlns="http://www.teradp.com/schemas/GN4/1/SearchConditions.xsd" xsi:type="SearchConditionList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<List Op="In" Path="ObjectType.Id" >
<IdList>
<IdName Name="image" />
<IdName Name="audio" />
<IdName Name="video" />
<IdName Name="img" />
<IdName Name="page" />
<IdName Name="font" />
</IdList>
</List>
</SearchNode>
</SearchConditions>
Save it as mysearch.xml in the c:\tera\gn4\scripts folder.
Create a batch file with the following commands:
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr image.data -name images
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr image.preview -name imagePreviews
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr audio.data -name audios
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr audio.audioPreview -name audioPreviews
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr video.data -name videos
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr video.videoPreview -name videos
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr video.videoPreview -name videoPreviews
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr img.high -name imgHighRes
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr img.low -name imgLowRes
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr img.preview -name imgPreviews
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr page.thumbnail -name pageThumbnails
C:\Tera\GN4\Bin\srv4.exe changevolume -conditions c:\tera\gn4\scripts\mysearch.xml -attr font.fontFile -name fonts
If your GN4 path is different, replace the C:\Tera\GN4\Bin\ with the correct GN4 bin path.
Run the batch file and then wait until export finishes.
New binary files will be stored in the file system too.