Code Monkey home page Code Monkey logo

redmop / sanoid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimsalterjrs/sanoid

2.0 2.0 0.0 884 KB

Policy-driven snapshot management and replication tools. Currently using ZFS for underlying next-gen storage, with explicit plans to support btrfs when btrfs becomes more reliable. Primarily intended for Linux, but BSD use is supported and reasonably frequently tested.

Home Page: http://www.openoid.net/products/

License: GNU General Public License v3.0

Perl 88.34% Shell 11.05% Makefile 0.62%

sanoid's People

Contributors

0xfate avatar attie avatar danielewood avatar darkbasic avatar faceprint avatar g-a-c avatar hrast01 avatar jasonblewis avatar jimsalterjrs avatar klemens-u avatar lalloni avatar lopsided98 avatar lordaro avatar martinvw avatar mattaw avatar matveevandrey avatar mschout avatar phreaker0 avatar pit3k avatar redmop avatar rlaager avatar rodgerd avatar rschaeuble avatar rulerof avatar shodanshok avatar spheenik avatar stardude900 avatar thehaven avatar tmlapp avatar unlawfulmonad avatar

Stargazers

 avatar  avatar

Watchers

 avatar

sanoid's Issues

Sanoid - Set specific times for snapshots

Weekly_day
Weekly_time
Daily_time
Monthly_day (allow last day of the month)
Monthly_time

If no snapshots of a specific time exist, still take immediately.
If snapshots are older than the time interval, take immediately, then again at the requested time

Triggered snapshots

This will allow programs to request snapshots.
I will mainly be using this for apt pre and post installing.
I'm not sure how to do this yet, maybe with trigger files.
The script writes a file to the disk, then waits for it to be removed before continuing (with timeout)
A program (probably incron) watches for this trigger file, and takes the snapshot

Don't forget to expire the snapshots.

Syncoid - PV options (average, rate limiting)

Defaults for pv are "-p -t -e -r -b". They all need included if average is used. Let's spell them out "--progress --timer --eta --rate --bytes"
Size for pv is "-s " Let's spell it out "--size "

Average for pv is "-a" Let's spell them out "--average-rate"

Rate limiting for pv is "-L " Lets spell it out withg "--rate-limit "

Syncoid - Better syncoid snapshot naming

Syncoid snapshots should have syncoid_source_destination type names. This will help with cleanup scripts when removing snapshots which have nothing to do with the host they are on. In other words, syncoid_hosta_hostb
syncoid_hosta_hostc

On hostb, hostc snapshots are not needed, and vice versa, so they can be deleted after X time. Maybe look to see if they exist on hosta, and delete them if they do not.

More frequent snapshots

Frequent_interval (minutes)
Frequent_time (round to the even amount? If interval is 15, round to 0, 15, 30, 45?)

Many other scripts use a 15 min interval. Let's add that.

Sanoid - Don't make snapshots so quickly

If no snapshots of a type, make one immediately.
If the time comes to make a specific snapshot (as in weeky_day, weekly_time or frequent_interval), take snapshot
Otherwise, don't take a snapshot unless enough time has passed to take another.

Sanoid and Synoid - Snapshots taken by this script are non-atomic

The problem:

Snapshots are not taken atomicly. Each object in the config file is taking individually.

Example:

DatasetA has a database
DatasetB has a file repository

A snapshot of DatasetA is taken
Both datasets are updated (database update, file added to repository)
A snapshot of DatasetB is taken
Your datasets are now out of sync. The database update is not saved, so the file added to the repo is orphaned.

Example 2:

DatasetA has a database
DatasetB has a file repository

A snapshot of DatasetB is taken
Both datasets are updated (database update, file added to repository)
A snapshot of DatasetA is taken
Your datasets are now out of sync. The database update is saved, but the file repo update is not, leaving orphaned data in the database. This is worse than the above.

Possible fix:

Take all the snapshots in a single command. As all the snapshots are pushed to an array n sanoid, this should need only minor changes near system($zfs, "snapshot", "$snap"); This is also needs fixing in syncoid, something around my $snapcmd = "$rhost $mysudocmd $zfscmd snapshot $fs\@$snapname\n"; This should not change expiring.

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.