[GIS] Alternative backup File or Personal Geodatabase

arcgis-10.1data-backupfile-geodatabasepersonal-geodatabase

I'm wondering if there is a way around or an alternative way to backup a File or Personal Geodatabase.

For example:

If I have a very large dataset within the File or Personal Geodatabase and I want to backup it up to several media storage devices such as External Hard drive, flash drive, DVD etc. Can this process be automated instead of performing it manually.

I work under the Government, so I may be limited to what I can do here in the office.

Best Answer

If you are looking to backup your geodatabase entirely, then this is the simplest approach. Create a windows batch file that copies your geodatabase to your media and add it to the scheduled task at midnight.

Here is the script, copy it and paste it on a new Notepad window and save it as backupgdb.bat. Replace C:\Data\mygeodatabase.gdb path in the code with your original gdb folder, and replace E:\Backup with your target backup location.

The script will automatically append the current date so you don't have to worry about that.

XCOPY "C:\Data\mygeodatabase.gdb" "E:\Backup\mygeodatabase%date:/=%" /D /E /C /R /I /K /Y 
pause

Now add the backupgdb.bat to the scheduled task, following are the necessary steps to do so.

  • From the start menu, type taskschd.msc to open up the Task Scheduler
  • Click on Create Basic Task and type in the name of the task, BackupGDB, click Next.
  • Select Daily, so the task runs on a daily basis. Click Next.
  • Select the time you want this task to run, leave it at midnight and click Next
  • Select Start a Program then click Next this way we let Windows start our Backupgdb.bat program.
  • Browse to your Backupgdb.bat file.
  • Click Finish and you are done.

You can create multiple batch files to backup to different locations using the same approach I guess. So you might have Backupgdb_Flash.bat, Backupgdb_NetworkDrive.bat etc..

This method might not be efficient if you want to backup a particular dataset in your geodatabase, as it will simply copy your entire geodatabase to a different location. If you have only a single dataset which is being constantly updated while rest of datasets are static, you will end up copying unchanged redundant data everyday. To copy a particular dataset only I recommend using Geodatabase Replication with a python script instead.

enter image description here