backup:laptops
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
backup:laptops [2007/09/20 16:03] – cangiani | backup:laptops [2019/11/06 10:43] – admin | ||
---|---|---|---|
Line 3: | Line 3: | ||
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.... | 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, | Nevertheless, | ||
- | As Laptops become more and more convinient | + | As Laptops become more and more convenient |
+ | ===== 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, if he/she do not have other solutions. | ||
+ | to get your Druva InSync account, please contact your system administrator; | ||
+ | |||
+ | ===== Personal Laptops ===== | ||
+ | |||
+ | The lab doesn' | ||
+ | |||
+ | - Homedir: the home directory is to store your work related documents/ | ||
+ | - Scratch server: The scratch server provide space for everyone and there' | ||
+ | - google disk/ | ||
===== Syncronizing work stuff with Unison ===== | ===== Syncronizing work stuff with Unison ===== | ||
- | [[http:// | + | [[http:// |
+ | |||
+ | 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. | ||
+ | |||
+ | 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 | ||
Line 32: | Line 49: | ||
==== What to exclude? ==== | ==== What to exclude? ==== | ||
- | Clearly any file that is derived from another one (e.g. compiled files like object .o files, and latex output .dvi files) should be excluded from any backup. Strictly speaking synchronization is not a backup but excluding non source files will speedup your synchronization process. | + | Clearly any **file that is derived from another one** (e.g. compiled files like object .o files, and latex output .dvi files) should be excluded from any backup. Strictly speaking, synchronization is not a backup but excluding non source files will speedup your synchronization process. |
- | It is sane to **use only one synchronization system** for a given file. Version control systems | + | Version control systems |
- | I use to to append | + | |
==== Configuration example ==== | ==== Configuration example ==== | ||
Line 67: | Line 83: | ||
ignore = Name *.{o,x} | ignore = Name *.{o,x} | ||
ignore = Name *.{tmp, | ignore = Name *.{tmp, | ||
- | ignore = Name *_svn | ||
ignore = Name *.sparseimage | ignore = Name *.sparseimage | ||
ignore = Name .DS_Store | ignore = Name .DS_Store | ||
Line 91: | Line 106: | ||
Please refer to the [[http:// | Please refer to the [[http:// | ||
+ | <note warning> | ||
+ | **Be careful with ignore files!!!** | ||
+ | |||
+ | Here is an extract from the official documentation: | ||
+ | |||
+ | It is important to be a little careful when renaming directories containing “ignore”d files. | ||
+ | For example, suppose Unison is synchronizing directory A between the two machines called the “local” and the “remote” machine; suppose directory A contains a subdirectory D; and suppose D on the local machine contains a file or subdirectory P that matches an ignore directive in the profile used to synchronize. Thus path A/D/P exists on the local machine but not on the remote machine. | ||
+ | |||
+ | 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). | ||
+ | </ | ||
==== 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 132: | Line 157: | ||
if [ $? -eq 0 ] ; then | if [ $? -eq 0 ] ; then | ||
msg=$(grep " | msg=$(grep " | ||
- | # notify-send -u low " | + | # |
growlnotify --title " | growlnotify --title " | ||
else | else | ||
Line 138: | Line 163: | ||
msg2=$(grep '< | msg2=$(grep '< | ||
msg3=$(grep '< | msg3=$(grep '< | ||
- | # notify-send -u critical -t 0 " | + | # |
growlnotify --title " | growlnotify --title " | ||
fi | fi | ||
Line 144: | Line 169: | ||
fi | fi | ||
</ | </ | ||
+ | |||
+ | {{backup: | ||
+ |
backup/laptops.txt · Last modified: 2023/10/09 14:33 by admin