[Physstaff] Backing up folders on a PC to the I drive using Unison
Timothy Briggs
timothy.briggs at strath.ac.uk
Thu Jun 2 11:04:41 BST 2016
Hello,
In order to use Unison to backup local folders to the I drive, please try the following steps.
- Download Unison from:
http://unison-binaries.inria.fr/
Windows - http://unison-binaries.inria.fr/files/Unison-2.40.102.zip
Mac - http://unison-binaries.inria.fr/files/Unison-OS-X-2.48.15.zip
The Windows install will also need a GTK library installed. The following works for me:
https://sourceforge.net/projects/gtk-win/
- Run the graphical version of the program (Unison-2.40.102 Gtk+.exe) and set up a profile.
First give it a name, preferably with no spaces
It's a local synchronisation
Choose the local directory first, and the I drive analogue second - I find selecting the Other ... option at the bottom quickest to get the drive listing
The resulting profile is written as a text file to your user folder within .unison
When you open the profile it tries to synchronise the folders. The first time, it displays a warning. The first synch will take some time.
Unison makes suggestions as to what it thinks needs to happen - if you agree, press Go to start the synchronisation.
You can run this synchronisation manually, and manage any conflicts that way - that works well for many users.
- To automate the backup, we need to use the text version of the program.
Create a batch file, Backup_Documents.bat for example, with the following:
"Path-to-app\Unison-2.40.102 Text.exe" Name-of-profile -batch
Try running it from a command prompt.
Use the Task Scheduler from Administrative Tools, choose Create Basic Task, name it, choose weekly, select the days, and choose the batch file.
- More advanced usage
You can edit the profile text file. A few features that may be useful:
- path allows you to choose files or directories within the root folder that you want to backup, rather than all of the subfolders
- ignore allows you to ignore a folder, subfolder or file
- There are various backup features that make Unison version key files as they are overwritten - this isn't strictly necessary on the I drive, as it has a way to recover the last few versions with a right-click on the file, but just so you know, particularly if files are changing more than once a day.
# Unison preferences
label = D Drive Documents
root = D:\Documents
root = I:\Science\Physics\Timothy\Documents
path = Personal
path = Personal/very_important_document.doc
ignore = Path Personal/Music
ignore = Name Thumbs.db
ignore = Name Desktop.ini
# Helps out a lot on Windows
fastcheck = true
# place new files at the top of the list
sortnewfirst = true
- For more information:
http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html
Thanks,
Timothy
Timothy Briggs
Research and Teaching Support
Department of Physics, University of Strathclyde, John Anderson Building, 107 Rottenrow, Glasgow G4 0NG
Tel: 0141 548 3376 Fax: 0141 552 2891 Email: mailto:timothy.briggs at strath.ac.uk
The University of Strathclyde is a charitable body, registered in Scotland, number SC015263
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://phys.strath.ac.uk/pipermail/physstaff/attachments/20160602/698d1bd0/attachment-0001.html
More information about the Physstaff
mailing list