mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
experimenting with btrfs snapshots...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1eac481159
commit
1b7d46781e
21
Archive/snapshot.sh
Executable file
21
Archive/snapshot.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
if ! [ -e ./media ] ; then
|
||||
btrfs subvolume create ./media
|
||||
# XXX build tree -- ImageGrid
|
||||
fi
|
||||
if ! [ -e ./.snapshots ] ; then
|
||||
mkdir ./.snapshots
|
||||
fi
|
||||
|
||||
#DATE=`date +%Y%m%d-%H%M%S`
|
||||
|
||||
SNAPSHOT=$((
|
||||
$( ls .snapshots \
|
||||
| sort -n \
|
||||
| tail -n 1 ) \
|
||||
+ 1 ))
|
||||
|
||||
|
||||
btrfs subvolume snapshot -r ./media .snapshots/${SNAPSHOT}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user