A tool to commit, prune, merge filesystem image created by sbox.
sbox-fstool ACTION NAME [OPTION]
# commit to default environment
sbox-fstool commit
# suppose we want to prune sandbox call 'sb2' that has its snapshot directory at '/mnt/usb0/backup'
ssbox-fstool prune sb2 --snapshot-dir /mnt/usb0/backup --verbose
# merge default sandbox's snapshot to rootfs ==> "/", applying all changes to disk
ssbox-fstool merge default
-
commit
Move uncommitted files from
DIRTY_DIR
toSNAPS_DIR
directory. -
prune
Remove sandbox
NAME
's identical files inSNAPS_DIR
if they are also inROOTFS_DIR
.
Help to reduce snapshot size. -
merge
Merge changes from
SNAPS_DIR
toROOTFS_DIR
for sandboxNAME
.
If you want to make changes permanent.
Please refer to --container-name NAME
above.
Default: default
-
-s | --snapshot-dir SNAPS_DIR
Used by action {commit, prune, merge}.
Default: /tmp/sbox//snapshot -
-d | --dirty-dir DIRTY_DIR
Used by action {commit}.
Default: /tmp/sbox//dirty -
-r | --rootfs-dir ROOTFS_DIR
Used by action {prune, merge}.
Default: / -
-v | --verbose
Print more information.
-
-h | --help
Display help information.
-
All disk I/O inside sandbox will be cached to
dirty
directory of your sandbox work directory in /tmp. Files indirty
will be copied to permenant storagesnapshot
when you commit. If you decide to apply all changes made in sandbox to disk, you can merge that sandbox'ssnapshot
with a rootfs of your choice. -
OverlayFS employs copy-on-write strategy, meaning once you edit a file, a copy of the file containing your edits will be created in the upper layer of the overlay mount. Even if you retore that file to its original state, the copy created earlier will stay in the upper layer despite it is virtually identical to its counterpart. prune function will find and delete these identical files.