CTX XChange 2 Software backup/resotre

jhittle

Jr. Member
Jun 7, 2016
68
81
Vancouver WA
Detector(s) used
â—„ Minelab CTX 3030
â—„ XP Deus
â—„ Minelab Equinox 800
â—„ Garrett AT Pro
Primary Interest:
All Treasure Hunting
OP
OP
jhittle

jhittle

Jr. Member
Jun 7, 2016
68
81
Vancouver WA
Detector(s) used
â—„ Minelab CTX 3030
â—„ XP Deus
â—„ Minelab Equinox 800
â—„ Garrett AT Pro
Primary Interest:
All Treasure Hunting
Based on the feedback from Minelab I have created a batch file to auto backup the Xchange 2 data

Hi Jerry

Sorry for the delayed response, I have been on carers leave this week and got back today.

The file they need is “C:\Users\<username>\AppData\Roaming\XChange2\mldata” note replace <username> with their own windows username.
If they would like to keep any images saved then they will need everything in the “C:\Users\<username>\AppData\Roaming\XChange2\Attachments” directory as well.

If they install XChange 2 and then copy the mldata file into the location and overwrite the old one and the contents of the Attachments folder then XChange 2 should just work with the original data.

There no official way of performing backups. You can copy all of the contents to the File folder and export them to a file. I have put this into our system as a possible new feature so it may happen in a future release but cannot guarantee anything

Regards,
Customer Service
Minelab Electronics Pty Ltd | 2 Second Ave, Mawson Lakes, SA 5095

I have modified the Xchange 2 desktop short cut to auto back and save a copy of the mldata in the event that I need to restore the data. The update will auto backup the data upon exit of the Xchange 2 software

Note set the directory locations where you want the backup then replace them in step 3

Step 1 create a auto-backup.bat file in a location that you want to store you backup
Example: D:\Minelab-backup

Step 2 create an attachments folder — this is where any saved images will be stored
Example: D:\Minelab-backup\Attachments

Step 3
Using notepad create your backup file and note replace <username> with your own windows username
xchange-autobackup.bat

C:
cd C:\Users\<username>\AppData\Roaming\XChange2\
start XChange2.exe -d'.\' -n'mldata' -r
Copy C:\Users\<username>\AppData\Roaming\XChange2\mldata /Y
D:\Minelab-backup
XCopy C:\Users\<username>\AppData\Roaming\XChange2\Attachments\*.* D:\Minelab-backup\Attachments /Y /S
Exit


Step 4 save the notepad file as xchange-auto.bat in your D:\Minelab-backup directory

Step 5 copy the original desktop xchange 2 shortcut file to D:\Minelab-backup
As a backup in case anything goes wrong you can recover the original desktop shortcut

Step 6
On the desktop right click your mouse on the xchange 2 short cut and select properties
Select the Shortcut Tab at the top of the properties window
And replace the target field with D:\Minelab-backup\xchange-autobackup.bat

Replace the Start-in field with
D:\Minelab-backup

Then click apply and close

Now your desktop icon for starting Xchange 2 will launch Xchange 2 and upon exit will backup your data. If this does not work then simply copy the backup shortcut from step 5 to restore the original shortcut and start over.

If you for any reason need to restore your backup re-install XChange 2 and then copy the mldata file into the location and overwrite the old one and the contents of the Attachments folder then XChange 2 now your backed up data is restored.
 

Last edited:
OP
OP
jhittle

jhittle

Jr. Member
Jun 7, 2016
68
81
Vancouver WA
Detector(s) used
â—„ Minelab CTX 3030
â—„ XP Deus
â—„ Minelab Equinox 800
â—„ Garrett AT Pro
Primary Interest:
All Treasure Hunting
The original script does a cumulative backup so if you delete any attachments they will not be deleted from the backup
this updated version will make a clean backup of your attachments each time .. (attachments are the pictures you associate with the GeoHunts)

Also remember to update the script example with your preferred backup locations, and if you are using Microsoft OneDrive or Dropbox then you can also consider using there sync locations as your backup location and then you will benefit by having your Minelab data also backed up in the cloud.

In the event you need to recover your data simply
Close xChange2 if its running
copy mldat to your C:\Users\<username>\AppData\Roaming\XChange2\
copy the attachments folder to C:\Users\<username>\AppData\Roaming\XChange2\
restart xChange 2 and your data is recovered

--- udated script starts here ----
C:
cd C:\Users\<username>\AppData\Roaming\XChange2\
start XChange2.exe -d'.\' -n'mldata' -r
Copy C:\Users\<username>\AppData\Roaming\XChange2\mldata /Y
Rd D:\Minelab-backup\Attachments/S /Q
Md D:\Minelab-backup\Attachments

XCopy C:\Users\<username>\AppData\Roaming\XChange2\Attachments\*.* D:\Minelab-backup\Attachments /Y /S
Exit
 

DeepseekerADS

Gold Member
Mar 3, 2013
14,880
21,727
SW, VA - Bull Mountain
Detector(s) used
CTX, Excal II, EQ800, Fisher 1260X, Tesoro Royal Sabre, Tejon, Garrett ADSIII, Carrot, Stealth 920iX, Keene A52
Primary Interest:
Other
Thank you for the favor you've done all CTX users, It's readily apparent you put a lot of time and thought into this. It's been so long since I've written a batch file I'd forgotten how.

I already back my data up nightly - lost the boot record on my hard drive maybe six weeks ago now, but was still able to retrieve the data with a freeware file named Recuva. The software worked, but it took 30 hours.
 

Top Member Reactions

Users who are viewing this thread

Top