btrfs send -p /mnt/snapshots/ /mnt/snapshots@202203101833 | btrfs receive /backup
btrfs send -p /mnt/snapshots/@yyyymmddhhmm /mnt/snapshots@202203101833 | btrfs receive /backup
They, in turn, should be populated by the ls command and curly brackets manipulation:
ROOTLIST=($(ls /mnt/snapshots/|grep '^@2'))
PREVROOTLIST=${ROOTLIST[-2]}
PREVROOTLIST=${ROOTLIST[-2]}
ROOTLIST=$(ls /mnt/snapshots | grep '^@2')
$ ls | grep '^w'
wacom_tablet_installation.odt
webcam_video_audio_capture_cli.txt
widgets.png
winehq.key
working
wpa_tui.sh
$ list=($(ls | grep '^w'))
$ echo ${list[-2]}
working
$ echo ${list[-1]}
wpa_tui.sh
$ echo ${list[0]}
wacom_tablet_installation.odt
$ echo ${list[1]}
webcam_video_audio_capture_cli.txt
$ echo ${list[2]}
widgets.png
Strange indexing, isn't it?
Leave a comment: