User Tools

Site Tools


backup:laptops

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
backup:laptops [2008/08/19 11:19] cangianibackup:laptops [2021/03/10 12:43] admin
Line 1: Line 1:
 ====== Backup of Laptops ====== ====== Backup of Laptops ======
-Laptops are the nightmare of any system-manager. Not only they are always a special case, therefore taking the same amount of work as 50 identical workstations, but also (and more importantly), their backup is under the only responsability of the user. 
-The files on a laptop are much more in danger than those on a workstation or on a file server: the laptop HardDisk is smaller and more fragile, the laptop can get stolen or lost, laptops get into many different uncontrolled networks.... 
-Nevertheless, we know that very few users backup their data on a regular basis.  
-As Laptops become more and more convinient to use, the important work data also becomes more and more in danger. It is useless to have a sophisticated centralized backup system as the one described above if users keep their important data on their laptop. So **please backup your work data as often as possible**. Afterall, your work data belongs to EPFL. 
  
 +===== EPFL Backup System for Laptop ====
 +
 +** All Employee of EPFL are required to do regular backups of the laptop computer they use **\\
 +For this reason EPFL provide a backup service (Druva InSync) free of charge that every user can request to use.
 +to get your Druva InSync account, please contact your system administrator, then, once installed and configured, the program will backup your files every 4 hours even if you're not connected to EPFL networks.
 +
 +===== Personal Laptops =====
 +
 +The lab doesn't provide direct support to personal laptops, but you can use different services of our filer structure to your gain. The use of these services as backup system is under your only responsibility, we don't control what you do and how you do it.
 +
 +  - Homedir: the home directory is to store your work related documents/programs/stuff, but you can use it also to store some personal related data (photos/images, videos, documents) if the footprint is relatively small (under 100 GB).
 +  - Scratch server: The scratch server provide space for everyone and there's no limit on the use of it. please use it as you like, but adopt a fair play policy, as everyone in the lab will need to store data.
 +  - google disk/dropbox/microsoft onedrive: these and others internet services are offering storage space for your personal data, **but their storage/use policy is against the rules of EPFL, the European GDPR and/or the Swiss laws regarding privacy** . Please refer to official EPFL documentation/policies about the  use of cloud services.
  
 ===== Syncronizing work stuff with Unison ===== ===== Syncronizing work stuff with Unison =====
-[[http://www.cis.upenn.edu/~bcpierce/unison/|Unison]] is a file-synchronization tool for Unix and Windows. Here we show how it can be used to keep the work stuff on your laptop in sync with your home directory on the file server.+[[http://www.cis.upenn.edu/~bcpierce/unison/|Unison]] is a very fast, efficient and easy to use file-synchronization tool for Unix (Linux and Apple OsX) and Windows.  
 + 
 +Note that, although very convenient, **Unison is not a real backup tool**: it does not keep an history of files, and it tends to replicate mistakes instead of reparing them (a file deleted by mistake on one machine will be deleted also on the other machine). On the other hand, we keep various backup of your home directory on the server. Therefore keeping your laptop in sync with your directory on our file-server is almost like backing it up. 
 +  
 +Here we show how it can be used to keep the work stuff on your laptop in sync with your home directory on the file server.
 Here is a short check list of the things to do: Here is a short check list of the things to do:
   - install unison   - install unison
   - cleanup your directories   - cleanup your directories
-  - chose and/or prioritize what to backup +  - chose and/or prioritize what to synchronize  
-  - decide what to exclude from the backup+  - decide what to exclude from synchronization
   - setup unison configuration files and startup scripts   - setup unison configuration files and startup scripts
  
 ==== Install Unison ==== ==== Install Unison ====
-You can either download it directly from the [[http://www.cis.upenn.edu/~bcpierce/unison/download.html|official web site]], or use a precanned package from your favorite distribution. Unison is included in most linux distribution and on both [[http://fink.sf.net|fink]] and [[http://macports.org|mac ports]] for Apple OS X. For a nice feedback from the backup scripts, we also suggest to install the [[http://growl.info/|growl notifier]] on OS X and libnotify on Linux.+You can either download it directly from the [[http://www.cis.upenn.edu/~bcpierce/unison/download.html|official web site]], or use a pre-canned package from your favourite distribution. Unison is included in most Linux distribution and on both [[http://fink.sf.net|fink]] and [[http://macports.org|mac ports]] for Apple OS X. For a nice feedback from the backup scripts, we also suggest to install the [[http://growl.info/|growl notifier]] on OS X and libnotify on Linux.
  
  
Line 100: Line 113:
 If D is renamed to D' on the remote machine, and this change is propagated to the local machine, all such files or subdirectories P will be deleted. This is because Unison sees the rename as a delete and a separate create: **it deletes the old directory (including the ignored files) and creates a new one** (notincluding the ignored files, since they are completely invisible to it). If D is renamed to D' on the remote machine, and this change is propagated to the local machine, all such files or subdirectories P will be deleted. This is because Unison sees the rename as a delete and a separate create: **it deletes the old directory (including the ignored files) and creates a new one** (notincluding the ignored files, since they are completely invisible to it).
 </note> </note>
- 
 ==== Do it! ==== ==== Do it! ====
 Now that you've prepared and tested your perfect configuration file, it is time to make sure that unison is executed periodically. On unix (linux and mac) you can symply call unison from a script like the following: Now that you've prepared and tested your perfect configuration file, it is time to make sure that unison is executed periodically. On unix (linux and mac) you can symply call unison from a script like the following:
Line 141: Line 153:
   if [ $? -eq 0 ] ; then   if [ $? -eq 0 ] ; then
     msg=$(grep "Synchronization complete" $ofile; grep "Nothing to do:" $ofile)     msg=$(grep "Synchronization complete" $ofile; grep "Nothing to do:" $ofile)
-#    notify-send -u low "Unison Sync OK" "$msg"                  # linux version+#    DISPLAY=:0.0 notify-send -u low "Unison Sync OK" "$msg"                  # linux version
     growlnotify --title "Unison Sync OK" -p Low -m "$msg"       # mac version     growlnotify --title "Unison Sync OK" -p Low -m "$msg"       # mac version
   else   else
Line 147: Line 159:
     msg2=$(grep '<-?->' $ofile | grep "new file" | head -n 1)     msg2=$(grep '<-?->' $ofile | grep "new file" | head -n 1)
     msg3=$(grep '<-?->' $ofile | grep "changed" | head -n 1)     msg3=$(grep '<-?->' $ofile | grep "changed" | head -n 1)
-#    notify-send -u critical -t 0 "Unison Sync Err" "$msg1 $msg2 $msg3"        # linux version+#    DISPLAY=:0.0 notify-send -u critical -t 0 "Unison Sync Err" "$msg1 $msg2 $msg3"        # linux version
     growlnotify --title "Unison Sync Err" -s -p High -m "$msg1 $msg2 $msg3"   # mac version     growlnotify --title "Unison Sync Err" -s -p High -m "$msg1 $msg2 $msg3"   # mac version
   fi   fi
Line 153: Line 165:
 fi fi
 </code> </code>
 +
 +{{backup:unison.sh|Here}} is the file I actually use. 
 +
backup/laptops.txt · Last modified: 2023/10/09 14:33 by admin