1 |
My recently-built machine has an SSD for everyday storage |
2 |
+ an HDD for less often used stuff + back-ups (in dir /y ). |
3 |
To avoid having to re-install the system if the SSD collapses one day, |
4 |
I wanted to make a simple back-up copy of vital files on the HDD. |
5 |
There are lots of apps in 'app-backup' & I looked at 3 |
6 |
-- Backintime, Luckybackup, Kbackup -- , which did the job, |
7 |
tho' configuring them took a bit of concentration. |
8 |
I also wrote a simple Bash script, which also does the job very well |
9 |
& which has caused me to remove the GUI apps & use it instead; |
10 |
it uses 2 exclude files & the code is below (from /usr/local/bin/ ). |
11 |
|
12 |
root:510 bin> cat bsys |
13 |
#!/bin/bash |
14 |
mount /dev/sdb8 /y |
15 |
rsync -av /bin /y/bkp-sys |
16 |
rsync -av /etc /y/bkp-sys |
17 |
rsync -av /lib32 /y/bkp-sys |
18 |
rsync -av /lib64 /y/bkp-sys |
19 |
rsync -av /opt /y/bkp-sys |
20 |
rsync -av /root /y/bkp-sys |
21 |
rsync -av /sbin /y/bkp-sys |
22 |
rsync -av /usr --exclude-from '/usr/local/bin/bsys-usrx' /y/bkp-sys |
23 |
rsync -av /var --exclude-from '/usr/local/bin/bsys-varx' /y/bkp-sys |
24 |
umount /y |
25 |
echo "done" |
26 |
|
27 |
root:508 bin> cat bsys-usrx |
28 |
# bsys-usrx : 121116 -- files to exclude from /usr |
29 |
local/ |
30 |
portage/ |
31 |
src/ |
32 |
|
33 |
root:509 bin> cat bsys-varx |
34 |
# bsys-varx : 121116 -- files to exclude from /var |
35 |
empty/ |
36 |
log/emerge-logs/ |
37 |
tmp/ |
38 |
|
39 |
HTH others. |
40 |
|
41 |
-- |
42 |
========================,,============================================ |
43 |
SUPPORT ___________//___, Philip Webb |
44 |
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto |
45 |
TRANSIT `-O----------O---' purslowatchassdotutorontodotca |