Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic snapshot #22

Open
kucksdorfs opened this issue Feb 19, 2017 · 10 comments
Open

Automatic snapshot #22

kucksdorfs opened this issue Feb 19, 2017 · 10 comments

Comments

@kucksdorfs
Copy link

Streamline the snapshot creation process and work with scheduler to make snapshots from every X minutes up to X hours.

If nothing else, provide details on how to use scheduler to take snapshots.

@luxflow
Copy link
Contributor

luxflow commented Feb 19, 2017

I'm planning to support this feature before that try using zfsnap
https://github.com/zfsnap/zfsnap

@brunopereira81
Copy link

brunopereira81 commented Feb 19, 2017

There is also something in place from the folks from ZFS on Linux: https://github.com/zfsonlinux/zfs-auto-snapshot

I have been using this in production servers where ZFS is used to keep snapshot creating and rotation in place.

@luxflow
Copy link
Contributor

luxflow commented Feb 19, 2017

I'm using currently zfs-auto-snapshot but the problem is that it doesn't use local time, so hard to know when snapshot is created

@kucksdorfs
Copy link
Author

This is above the requirements above, but is thee any way to compare snapshots? So if nothing has changed between snapshots delete the older snapshot?

@luxflow
Copy link
Contributor

luxflow commented Feb 19, 2017

zfs diff for snapshot comparing , but I didn't heard of automatically deleting not changed older snapshot, and don't think it should be

@brunopereira81
Copy link

@luxflow #22 (comment)

[root@vm000585 ~]$ zfs list -t snapshot | tail -n 5
database/postgres@zfs-auto-snap_frequent-2017-02-19-1330  67.5K      -  7.21G  -
database/postgres@zfs-auto-snap_frequent-2017-02-19-1345  66.5K      -  7.21G  -
database/postgres@zfs-auto-snap_frequent-2017-02-19-1400  65.5K      -  7.21G  -
database/postgres@zfs-auto-snap_hourly-2017-02-19-1401    66.5K      -  7.21G  -
database/postgres@zfs-auto-snap_frequent-2017-02-19-1415  67.5K      -  7.21G  -
[ANSIBLE MANAGED]
[root@vm000585 ~]$ date
Sun Feb 19 15:19:26 CET 2017
[ANSIBLE MANAGED]
[root@vm000585 ~]$ ll /etc/localtime
lrwxrwxrwx. 1 root root 38 May  6  2016 /etc/localtime -> ../usr/share/zoneinfo/Europe/Amsterdam

Weird, seems to be OK for me, what's your system setup? I might try to reproduce it and fix if needed in the auto-snapshot repository.

@luxflow
Copy link
Contributor

luxflow commented Feb 19, 2017

@brunopereira81
it used localtime, but on some timezone, due to daylight saving problem,
In upstream version uses --utc option no way to fiddle this behavior except modify source

@Skaronator
Copy link

Found some more tools if somebody want to implement them:

@Skaronator
Copy link

In case anyone implement this to the plugin please take a look at this page https://github.com/zfsonlinux/zfs-auto-snapshot/wiki/Samba

The Snapshot versions of the files are available via samba on Windows which is pretty neat.

@rudedogg
Copy link

rudedogg commented Mar 2, 2018

I set this up using zfSnap as suggested above.

It's as easy as ssh-ing in, running apt install zfsnap and adding a few scheduled tasks through the web admin:
screen shot 2018-03-02 at 12 37 38 pm

A built in feature to do this would be really nice though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants