Code Monkey home page Code Monkey logo

reflink-snapshot's Introduction

Reflink based File/Directory Snapshots

This tool works only if the XFS filesystem is created with the reflink support. For example,

$ mkfs.xfs -b size=4096 -m reflink=1,crc=1 /dev/sdb

Install

curl -L https://github.com/kadalu/reflink-snapshot/releases/latest/download/reflink-snapshot-`uname -m | sed 's|aarch64|arm64|' | sed 's|x86_64|amd64|'` -o reflink-snapshot
install reflink-snapshot /usr/local/bin/

Create a File or Directory Snapshot.

reflink-snapshot create ROOT_DIR PATH@SNAPNAME

Example: File Snapshot

$ reflink-snapshot create /mnt/data photos/2021/my-awesome-photo.jpeg@s1
Snapshot created successfully!

Example: Directory Snapshot

$ reflink-snapshot create /mnt/data photos/2021@s1
Snapshot created successfully!

List Snapshots

reflink-snapshot list ROOT_DIR
reflink-snapshot list ROOT_DIR PATH

Example:

$ reflink-snapshot list /mnt/data
photos/2021@s1 (directory)
photos/2021/my-awesome-photo.jpeg@s1  (file)
$
$ reflink-snapshot list /mnt/data photos/2021/my-awesome-photo.jpeg
photos/2021/my-awesome-photo.jpeg@s1  (file)

Delete a Snapshot

reflink-snapshot delete ROOT_DIR PATH@SNAP_NAME
$ reflink-snapshot delete /mnt/data photos/2021/my-awesome-photo.jpeg@s1
Snapshot deleted successfully!

Rollback a Snapshot

reflink-snapshot rollback ROOT_DIR PATH@SNAP_NAME
$ reflink-snapshot rollback /mnt/data photos/2021/my-awesome-photo.jpeg@s1
Snapshot rollback successful!

Mount a Snapshot

reflink-snapshot mount ROOT_DIR PATH@SNAP_NAME MOUNTPOINT

Directory Snapshot

$ mkdir /mnt/photos_2021@s1
$ reflink-snapshot mount /mnt/data photos/2021@s1 /mnt/photos_2021@s1

File Snapshot

$ touch /mnt/[email protected]
$ reflink-snapshot mount /mnt/data photos/2021/my-awesome-photo.jpeg@s1 /mnt/[email protected]

reflink-snapshot's People

Contributors

aravindavk avatar

Stargazers

 avatar Uranus Zhou avatar  avatar

Watchers

 avatar Sachidananda Urs avatar Amar Tumballi avatar James Cloos avatar

Forkers

flashaccel

reflink-snapshot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.