[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Home made backup system



On 18/12/19 at 18:02, rhkramer@gmail.com wrote:
> Aside / Admission: I don't backup all that I should and as often as I should, 
> so I'm looking for ways to improve.  One thought I have is to write my own 
> backup "system" and use it, and I've thought about that a little, and provide 
> some of my thoughts below.
> ...

I was amazed that nobody yet considered tar. My backup with tar is based
to a script that invoke tar reading two hidden file .tarExclude and
.tarInclude:

~# cat .tarExclude
/home/myuser/.cache
/home/myuser/.kde
/home/myuser/.mozilla/firefox/xxxxxxxx.default
/home/myuser/VirtualBox\ VMs
/home/myuser/Shared
/home/myuser/Sources
/home/myuser/Video
/home/myuser/Scaricati
/home/myuser/Modelli
/home/myuser/Documenti
/home/myuser/Pubblici
/home/myuser/Desktop
/home/myuser/Immagini
/home/myuser/Musica
/home/myuser/linux-source-4.19

~# cat .tarInclude
/home/myuser
/root/
/etc/
/usr/local/bin/
/usr/local/etc/
/boot/grub/grub.cfg
/boot/config-4.19.67

then the script invoke tar command this way:

/bin/tar -X /root/.tarExclude -zcpvf /tmp/$f -T /root/.tarInclude

$f variable is the filename that it'll be moved to USB stick once tested
with the command:

/bin/tar ztf /tmp/$f >/dev/null

one thing you must take care is that the -X switch must came before of
the -T switch otherwise tar command fails.
HTH

Merry Xmas

-- 
Franco Martelli


Reply to: