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:31] 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 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...+===== EPFL Backup System for Laptop ==== 
-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 dangerIt is useless to have sophisticated centralized backup system as the one described above if users keep their important data on their laptopSo **please backup your work data as often as possible**. Afterallyour work data belongs to EPFL.+** All Employee of EPFL are required to do regular backups of the laptop computer they use **\\ 
 +For this reason EPFL provide backup service (Druva InSyncfree 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 responsibilitywe 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 itplease use it as you like, but adopt 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 EPFLthe 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 very fast, efficient and easy to use file-synchronization tool for Unix and Windows. +[[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 repearing 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.+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 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.
Line 19: Line 29:
  
 ==== 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 103: 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 144: 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 150: 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 156: 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