FreeBSD backup a folder from an SDcard with ext2fs to FreeBSD server

<-----69------------------------------------------------------------>

Last update : 2023-07-15

Connect the card reader with the sd card to the server

See connected storage devices
# geom disk list

See available device slices
% ls /dev/da*

Mount slice to the server
# mount -t ext2fs -o -gusername,-uusername /dev/da1s2 /media

Backup /source directory/ contents to the target tgz file in the server
# tar czvf /targer-directory/target-file.tgz /source-directory/

When finished unmount the device's slice
# umount /media

Disconnect card reader/sd-card

In case of" emergency" restore data from tgz file with the command
Example 18.4. Restoring Up the Current Directory With tar
# tar xzvf /tmp/mybackup.tgz

Thanks to the FreeBSD community for the exellent OS and documentation

Chapter 20. Storage
20.9. Backup Basics
https://docs.freebsd.org/en/books/handbook/disks/#backup-basics

Chapter 23. Other Filesystems
23.2. Linux File Systems
https://docs.freebsd.org/en/books/handbook/filesystems/