In the following I list the root folder, and all of my file systems.
Then I raise issues with links, both hard and symbolic.
Then I ask for more specific advice.
- Code: Select all
$ (ls -al / ; df)
total 172
drwxr-xr-x 22 root root 4096 Mar 18 15:48 ./
drwxr-xr-x 22 root root 4096 Mar 18 15:48 ../
lrwxrwxrwx 1 root root 7 Sep 24 2018 bin -> usr/bin/
drwxr-xr-x 5 root root 12288 Jun 15 22:56 boot/
drwx------ 2 root root 4096 Mar 18 15:48 .cache/
drwx------ 3 root root 4096 Dec 16 2019 .dbus/
-rw------- 1 root root 66577 Dec 23 2019 dead.letter
drwxr-xr-x 21 root root 4540 Jun 15 22:56 dev/
drwxr-xr-x 139 root root 12288 Jun 15 22:57 etc/
drwxr-xr-x 12 root root 4096 Sep 24 2018 home/
drwxr-xr-x 2 root root 4096 Sep 24 2018 initrd/
lrwxrwxrwx 1 root root 7 Sep 24 2018 lib -> usr/lib/
lrwxrwxrwx 1 root root 9 Sep 24 2018 lib64 -> usr/lib64/
drwx------ 2 root root 16384 Dec 16 2019 lost+found/
drwxr-xr-x 2 root root 4096 Sep 24 2018 media/
drwxr-xr-x 2 root root 4096 Sep 24 2018 mnt/
drwxr-xr-x 4 root root 4096 Dec 21 2019 opt/
dr-xr-xr-x 310 root root 0 Jun 14 14:40 proc/
drwxr-x--- 12 root root 4096 Jun 18 12:30 root/
drwxr-xr-x 36 root root 1000 Jun 18 12:01 run/
lrwxrwxrwx 1 root root 8 Sep 24 2018 sbin -> usr/sbin/
drwxr-xr-x 11 root root 4096 Nov 28 2020 share/
drwxr-xr-x 2 root root 4096 Sep 24 2018 srv/
dr-xr-xr-x 13 root root 0 Jun 14 14:40 sys/
drwxrwxrwt 15 root root 4096 Jun 18 04:02 tmp/
drwxr-xr-x 14 root root 4096 Dec 16 2019 usr/
drwxr-xr-x 19 root root 4096 Jul 4 2020 var/
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev *
tmpfs 1.9G 50M 1.9G 3% /dev/shm *
tmpfs 1.9G 1.2M 1.9G 1% /run
/dev/md0 39G 84M 37G 1% /
/dev/md1 44G 38G 4.6G 90% /usr
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/md127 7.7G 711M 6.6G 10% /boot
/dev/md2 43G 53M 40G 1% /tmp
/dev/md3 41G 17G 22G 43% /var
/dev/md4 192G 82G 111G 43% /home
/dev/md5 544G 112G 405G 22% /share
tmpfs 384M 48K 384M 1% /run/user/1000
issues with links:
Hard Links: The inode numbers used in hard links are only unique to each file system. For example, I am backing up files from file systems (/, /usr, /var, /home, and /share). If I copy hard links as another hard link, (and do not copy each entire data file) then I need to have a separate destination file system for each of the source file systems.
Symbolic Links: Symbolic links come as absolute, and relative links.
Looking above "bin -> usr/bin" is a relative link. "bin -> /usr/bin" would be an absolute link. A copy of a relative link still points to the original file in the destination file system. A copy of an absolute symbolic link points to the file in the source file system, which may have changed.
If the above is correct then the backup destination must have separate file systems for each of the source file systems.
The sample code in
viewtopic.php?f=41&t=5957 excludes (/dev, /tmp, /var/tmp, /var/cache, /home, /media, /proc, /sys, and /mnt). He uses other means to backup /home.
Should I exclude /run?
How should I deal with the lost+found folders?