this is my short list at the moment for things to exclude when backing up my ImDisk RamDrive to a 7zipped archive for long term preservation:

Temp
System Volume Information
$Recycle.Bin
.Trash-1000
swapfile.sys
pagefile.sys

the drive is not a C: windowsOS drive. but i have moved 7z, firefox, and some other cashes to that RamDrive drive so they do not end up written often on my SSD reducing longevity.

what are some other things 'not' to include when making backups of a RamDisk ?

and as a side note, what are some good things to link-junction to a RamDisk to prevent 'thrashing?' of a SSD. (I guess its probably just 're-writeing' now, as thrashing is related to HDD arms and platters?)

PS, i use Robocopy first to make the LIVE backup the system will boot from, and a zip of that gets archived.

this batch file is for when i do it manually but holds all the code i came up with to do it all effectively in one manual backup swoop.

ROBOCOPY and 7-Zip were/are native to my system during install. but not every Win version may have them.

if my alphabet soup helps some one, then Yay! \o/

@echo off
Z:
cd \

ROBOCOPY Z: C:\Zb /MIR /A-:SH /TBD /R:5 /W:5 /NP /V /XD "Z:\System Volume Information" "Z:\$RECYCLE.BIN" /XF "Z:\swapfile.sys"  "Z:\pagefile.sys" >E:\Za\RoboCopyZ-2-Zb.log
timeout /T 2 >NUL
attrib -r -s -h C:\Zb /s /d

C:
cd C:\Zb


REM gets the DateTime  in  YYYY-MM-DD@HH;MM;SS
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"

set dt=%dt:~0,4%-%dt:~4,2%-%dt:~6,2%@%dt:~8,2%;%dt:~10,2%;%dt:~12,2%
REM echo dt set to %dt%


REM 7-zips the file with a d-at-e@t;im;e in the name
"C:\Program Files\7-Zip\7z.exe" a -t7z E:\Za\Z_%dt%.7z -r

E:
cd E:\Za

REM     skip=10 newest .7z's del the rest.
for /F "skip=10 eol=| delims=" %%I in ('dir "E:\Za\Z_*.7z" /A-D-H /B /O-D 2^>nul') do del "%%I"
 

Last edit: Thumpie Bunny Eve 2020-11-24