ECHO OFF REM RMfullbackup.bat REM by Tom Holden 2011-02-02 REM Backs up a RootsMagic database file and all the media files referenced by it to one, compressed RAR file. REM REM Command syntax: RMfullbackup.bat REM Close the database file before running. REM REM The first backup can take considerable time, depending on the total of the file sizes. REM To save time on subsequent backups, RMfullbackup merely updates the backup file for those files added, changed or deleted. REM Install the SQLite3 command line version in the same directory as the RMGC database file(s) REM OR set a system PATH to where sqlite3.exe is located REM OR prepend the path to sqlite3.exe in the command below. REM Likewise for RAR.exe REM Under the RM Data folder, create a folder Backups; if a different path is to be used, edit the command line below. REM REM The backup file will be written to the Backups folder and will have the name _fullbackup.rar REM An error log will also be written to the Backups folder with the name _fullbackuperror.log REM REM backup media files listed by query followed by the database file sqlite3.exe %1.rmgc "SELECT DISTINCT MediaPath || MediaFile from MultiMediaTable;" | rar a -u -as -ilog.\backups\%1_fullbackuperror.log backups\%1_fullbackup @ %1.rmgc PAUSE END