first of all, thanks for sharing!
I'm testing this in a kubernetes environment.
My pod uses secrets which I believe end up mounted in a readonly file system which makes the copy operation fail:
copying [36/39]: sbin
copying [37/39]: srv
copying [38/39]: usr
copying [39/39]: var
panic: Error response from daemon: Error processing tar file(exit status 1): remove /var/run/secrets/kubernetes.io/serviceaccount/..data: read-only file system
This is the 'df' output inside my pod:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
overlay 102044664 64268072 33513944 66% /
tmpfs 65536 0 65536 0% /dev
tmpfs 8132592 0 8132592 0% /sys/fs/cgroup
/dev/mapper/vg_os-lv_root
102044664 64268072 33513944 66% /dev/termination-log
/dev/mapper/vg_os-lv_root
102044664 64268072 33513944 66% /etc/resolv.conf
/dev/mapper/vg_os-lv_root
102044664 64268072 33513944 66% /etc/hostname
/dev/mapper/vg_os-lv_root
102044664 64268072 33513944 66% /etc/hosts
shm 65536 0 65536 0% /dev/shm
tmpfs 8132592 12 8132580 0% /var/run/secrets/kubernetes.io/serviceaccount
tmpfs 8132592 0 8132592 0% /proc/acpi
tmpfs 65536 0 65536 0% /proc/kcore
tmpfs 65536 0 65536 0% /proc/keys
tmpfs 65536 0 65536 0% /proc/timer_list
tmpfs 65536 0 65536 0% /proc/timer_stats
tmpfs 65536 0 65536 0% /proc/sched_debug
tmpfs 8132592 0 8132592 0% /proc/scsi
tmpfs 8132592 0 8132592 0% /sys/firmware
still, I'm lucky the other files (outside /var) have been successfully copied but may be worth to think about this edge case.
first of all, thanks for sharing!
I'm testing this in a kubernetes environment.
My pod uses secrets which I believe end up mounted in a readonly file system which makes the copy operation fail:
This is the 'df' output inside my pod:
still, I'm lucky the other files (outside /var) have been successfully copied but may be worth to think about this edge case.