To restore database backup files safely, read the backup first, then restore under a name and paths you choose. This post builds a small demo database, backs it up, and restores it with MOVE and REPLACE. It also explains the errors that stop most restores.
SQL SERVER – Shrinking Truncate Log File – Log Full
The old code I used to truncate log file space with DBCC SHRINKFILE and BACKUP LOG WITH TRUNCATE_ONLY. It breaks the log chain, so take a full backup after.


