Hot answers tagged

5

for dir in ????-??-??--??:??:??/; do if [[ $dir > "2020-01-05--00:00:00" ]]; then printf '%s\n' "$dir" # process "$dir" here break fi done The above script will loop through the directories in the current directory whose names matches the pattern ????-??-??--??:??:??. For each directory, it is compared to the string ...


4

"Cold" backup is much safer than "live" backup. On a running PI, run following command dd if=/dev/zero of=/tmp/zero bs=8M; rm /tmp/zero It will write zeroes on all free space, which will give high compression rate. then put raspberry pi's microSD onto another system, for example, on a desktop running ubuntu and run fdisk -l I see microSD as /dev/sdb, ...


4

I came up with $ printf '%s\n' ????-??-??--??:??:?? | awk '$1 > "2020-01-05--00:00:00"{print;exit}' 2020-01-23--13:24:13


2

As suggested in the comments, you have a number of filesystem-level options for backing up the Pi. If you do this you will need to exclude the virtual filesystems /proc and /sys. You also should be aware that it will not include the non-filesystem boot image or your partition table; I'll provide a suggestion for backing that up separately at the end of this ...


2

With zsh: ref=2020-01-05--00:00:00 list=($ref *(DN/oN)) # list is ref + all directories unsorted list=(${(o)list}) # sort the list (as per locale collation algorithm) print -r -- ${list[$list[(ie)$ref] + 1]-none} (where $array[(ie)string] expands to the array index of the element that is exactly string).


1

If you can skip up the tape at will, I don't see a significant advantage in keeping the list of contents at the front anyway. I would append a number of smaller tar archives to each tape to improve the retrieval time for specific files. Possibly 20 archive subfiles per tape would be a suitable balance. I would keep the catalogue for each tape on disk: ...


1

I was working on something similar the other night. My setup is a little different in that I do not use a home directory, each LVM is mounted at its own root level directory but a few things that may help: In the [Global] section, i enforce a minimum SMB level using: [Global] min protocol = SMB2 If you are running SMB 4 you could also set SMB3 as a ...


1

Have you tried telling SELinux on the server that the directory may be accessed by Samba? It might be as simple as telling SELinux that sharing of home directories is allowed: setsebool -P samba_enable_home_dirs 1


1

Basically it comes down to the question of how valuable and replaceable your data is. If your data is time-consuming to replace, then consider 2x 4TB disks in a RAID 1 configuration. If your data is irreplaceable, ensure you not only have RAID 1 but also have backups. Ideally off-site backups. Your 1x 4TB suggestion provides no protection for your data ...


1

You would want to look at https://pypi.org/project/zfec/ This does exactly what you are looking for. E.g. zfec -k3 -m6 input.dat creates 6 files, 3 of which are necessary to reconstruct the original file.


Only top voted, non community-wiki answers of a minimum length are eligible