-
Senior Member
registered user
Further refinements to the personal backup idea.
.
I've incorporated all of Werner's excellent suggestions, and since
I found I never referred to the tar listing, that's been omitted.
In examining the remaining contributors to the 'personal backup', I found
that not only is .mozilla the real space hog, but its caches are its
biggest contributors. It is possible to clear at least one of these caches
with a quick trip to the IceWeasel Edit>Preferences GUI before making
a backup, resulting in a great reduction in the size of the stored file.
A revised listing is as follows:
Code:
#!/bin/bash
#
# new.backup2: do 'chmod +x new.backup2' & 'chown root:root new.backup2'
# Before backup, Go to Edit>Prefs on IceWeasel & 'Clear Now' the Off-Line cache.
#
cd /; STOR=/mnt-system/update$(date +'%m%d%H').tar.gz
echo -e 'Compressing data; patience, this may take a little time..\c'
tar -czf $STOR KNOPPIX-DATA/home/ KNOPPIX-DATA/etc/ \
KNOPPIX-DATA/root/ mnt-system/boot/syslinux/syslinux.cfg
echo '.Done.'; echo 'Restore using the command, tar -xzf '$STOR' -C /'
#
exit 0
Now if some clever person here will inform me of some appropriate API,
assuming there is one, we might automate that effort as well. This is
to say that I haven't been able to 'exclude' from the tar inclusion
the Cache & OfflineCache directories from ~/.mozilla/firefox/*.default/
which are the culprits I'd like to exclude.
-
Werner's excellent suggestions
Please, don't exaggerate ![Smile](images/smilies/icon_smile.gif)
A suggestion with exclude something:
Code:
cd /; STOR=/mnt-system/update$(date +'%m%d%H').tar.gz
echo -e 'Compressing data; patience, this may take a little time..\n'
tar -cz --exclude=*/Cache/* --exclude=*/OfflineCache/* \
-f $STOR KNOPPIX-DATA/home/ KNOPPIX-DATA/etc/ \
KNOPPIX-DATA/root/ mnt-system/boot/syslinux/syslinux.cfg
-
Senior Member
registered user
Thanks, I needed that.
.
With that refinement, my backup only takes 46 Mb now.
Thanks a heap & best regards.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive picture](/store/img/g/yKsAAOSwNPJlqMdQ/s-l225/Fanxiang-SSD-4TB-2TB-1TB-PS5-SSD-M-2-NVME-SSD-7300.jpg)
Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive
$246.99
![4tb Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch Sata SSD For Laptop picture](/store/img/g/eD8AAOSwXbhmYg9y/s-l225/4tb-Ssd-870evo-Internal-Solid-State-Drive-Hard-Dis.jpg)
4tb Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch Sata SSD For Laptop
$47.79
![Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot picture](/store/img/g/pB0AAOSwrbRkIWhk/s-l225/Fanxiang-4TB-2TB-1TB-SSD-550MB-s-2-5-SATA-III-Inte.jpg)
Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot
$188.99
![Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot picture](/store/img/g/pJUAAOSwFaRkhuj-/s-l225/Netac-1TB-2TB-512GB-Internal-SSD-2-5-SATA-III-6Gb-.jpg)
Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot
$119.99
![Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5](/store/img/g/RzIAAOSwSZNlN-zB/s-l225/Patriot-P210-128GB-256GB-512GB-1TB-2TB-2-5-SATA-3-.jpg)
Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot
$13.99
![Patriot P300 128G 256GB 512GB 1TB 2TB M.2 2280 PCIe Gen3x4 NVMe Internal SSD Lot picture](/store/img/g/4A0AAOSw4aRlCzo8/s-l225/Patriot-P300-128G-256GB-512GB-1TB-2TB-M-2-2280-PCI.jpg)
Patriot P300 128G 256GB 512GB 1TB 2TB M.2 2280 PCIe Gen3x4 NVMe Internal SSD Lot
$16.99
![1080pro 4TB SSD Solid State Hard Drive Ngff M.2 SSD Gaming Internal Hard Disk US picture](/store/img/g/WjwAAOSwE5NmeyrR/s-l225/1080pro-4TB-SSD-Solid-State-Hard-Drive-Ngff-M-2-SS.jpg)
1080pro 4TB SSD Solid State Hard Drive Ngff M.2 SSD Gaming Internal Hard Disk US
$54.99
![WD BLUE 3D NAND 250GB 2.5](/store/img/g/aT4AAOSwc8FmeHA7/s-l225/WD-BLUE-3D-NAND-250GB-2-5-SATA-Laptop-SSD-Solid-St.jpg)
WD BLUE 3D NAND 250GB 2.5" SATA Laptop SSD Solid State Tested,Wiped -WDS250G2B0A
$16.00
![Fanxiang SSD 4TB 2TB 1TB 512GB SATA SSD 2.5'' III Internal Solid State Drive lot picture](/store/img/g/pB0AAOSwrbRkIWhk/s-l225/Fanxiang-SSD-4TB-2TB-1TB-512GB-SATA-SSD-2-5-III-In.jpg)
Fanxiang SSD 4TB 2TB 1TB 512GB SATA SSD 2.5'' III Internal Solid State Drive lot
$108.29
![SSD 512GB 1/2/4TB 870 EVO SATA III SSD 2.5'' Solid State Drive Upgrade PC Laptop picture](/store/img/g/1xoAAOSwHrhmaWn2/s-l225/SSD-512GB-1-2-4TB-870-EVO-SATA-III-SSD-2-5-Solid-S.jpg)
SSD 512GB 1/2/4TB 870 EVO SATA III SSD 2.5'' Solid State Drive Upgrade PC Laptop
$59.99