hi all I''m using a custom snaopshot scheme which snapshots every hour, day, week and month, rotating 24h, 7d, 4w and so on. What would be the best way to zfs send/receive these things? I''m a little confused about how this works for delta udpates....... Vennlige hilsener / Best regards roy -- Roy Sigurd Karlsbakk (+47) 97542685 roy at karlsbakk.net http://blogg.karlsbakk.net/ -- I all pedagogikk er det essensielt at pensum presenteres intelligibelt. Det er et element?rt imperativ for alle pedagoger ? unng? eksessiv anvendelse av idiomer med fremmed opprinnelse. I de fleste tilfeller eksisterer adekvate og relevante synonymer p? norsk.
> From: opensolaris-discuss-bounces at opensolaris.org [mailto:opensolaris- > discuss-bounces at opensolaris.org] On Behalf Of Roy Sigurd Karlsbakk > > I''m using a custom snaopshot scheme which snapshots every hour, day, > week and month, rotating 24h, 7d, 4w and so on. What would be the best > way to zfs send/receive these things? I''m a little confused about how > this works for delta udpates.......Out of curiosity, why custom? It sounds like a default config. Anyway, as long as the present destination filesystem matches a snapshot from the source system, you can incrementally send any newer snapshot. Generally speaking, you don''t want to send anything that''s extremely volatile such as hourly... because if the snap of the source disappears, then you have nothing to send incrementally from anymore. Make sense? I personally send incrementals once a day, and only send the daily incrementals.
On Sep 25, 2010, at 7:42 PM, "Edward Ned Harvey" <shill at nedharvey.com> wrote:>> From: opensolaris-discuss-bounces at opensolaris.org [mailto:opensolaris- >> discuss-bounces at opensolaris.org] On Behalf Of Roy Sigurd Karlsbakk >> >> I''m using a custom snaopshot scheme which snapshots every hour, day, >> week and month, rotating 24h, 7d, 4w and so on. What would be the best >> way to zfs send/receive these things? I''m a little confused about how >> this works for delta udpates....... > > Out of curiosity, why custom? It sounds like a default config. > > Anyway, as long as the present destination filesystem matches a snapshot from the source system, you can incrementally send any newer snapshot. Generally speaking, you don''t want to send anything that''s extremely volatile such as hourly... because if the snap of the source disappears, then you have nothing to send incrementally from anymore. Make sense?It is relatively easy to find the latest, common snapshot on two file systems. Once you know the latest, common snapshot, you can send the incrementals up to the latest.> > I personally send incrementals once a day, and only send the daily incrementals.For NexentaStor customers, the auto-sync service manages this rather well. -- richard
Casper.Dik at Sun.COM
2010-Sep-26 07:39 UTC
[zfs-discuss] [osol-discuss] zfs send/receive?
>hi all > >I''m using a custom snaopshot scheme which snapshots every hour, day, >week and month, rotating 24h, 7d, 4w and so on. What would be the best >way to zfs send/receive these things? I''m a little confused about how >this works for delta udpates....... > >Vennlige hilsener / Best regardsThe initial backup should look like this: zfs snapshot -r export at backup-2010-07-12 zfs send -R export at backup-2010-07-12 | zfs receive -F -u -d portable/export (portable is a "portable" pool; the export filesystem needs to exist; I use one zpool to receive different zpools, each in their own directory) A incremental backup: zfs snapshot -r export at backup-2010-07-13 zfs send -R -I export at backup-2010-07-12 export at backup-2010-07-13 | zfs receive -v -u -d -F portable/export You need to make sure you keep the last backup snapshot; when receiving the incremental backup, destroyed filesystems and snapshots are also destroyed in the backup. Typically, I remove some of the snapshot *after* the backup; they are only destroyed during the next backup. I did notice that send/receive gets confused when older snapshots are destroyed by time-slider during the backup. Casper
> From: Richard Elling [mailto:richard.elling at gmail.com] > > It is relatively easy to find the latest, common snapshot on two file > systems. > Once you know the latest, common snapshot, you can send the > incrementals > up to the latest.I''ve always relied on the snapshot names matching. Is there a way to find the latest common snapshot if the names don''t match?
On Sep 26, 2010, at 4:41 AM, "Edward Ned Harvey" <shill at nedharvey.com> wrote:>> From: Richard Elling [mailto:richard.elling at gmail.com] >> >> It is relatively easy to find the latest, common snapshot on two file >> systems. >> Once you know the latest, common snapshot, you can send the >> incrementals >> up to the latest. > > I''ve always relied on the snapshot names matching. Is there a way to find > the latest common snapshot if the names don''t match?If the snapshot names don''t match, then the snapshots are not of the same data, by definition. The actual comparison is easy: given two (time sorted) lists, find the latest, common entry. -- richard
Casper Dik wrote on 2010-09-26:> A incremental backup: > > zfs snapshot -r export at backup-2010-07-13 > zfs send -R -I export at backup-2010-07-12 export at backup-2010-07-13 | > zfs receive -v -u -d -F portable/exportUnfortunately "zfs receive -F" does not skip existing snapshots and thus if the "zfs send -R | zfs receive -F" process is somewhat interrupted (e.g. network downtime) it can''t be simply retried, as some recursively-reached sub-filesystem will have some latest snapshot and some others would have a different latest snapshot. The code comments around libzfs_sendrecv.c:1885 seems to indicate that existing data should be properly skipped, using a call to recv_skip(), but the "zfs receive" process dies just after having warned about ignored data, and thus "zfs send" dies of a broken pipe. Also refer to: http://thread.gmane.org/gmane.os.freebsd.devel.file-systems/6490 In your opinion is this intentional (ignoring as in "stopping now") or really a bug (if my interpretation of the intent of recv_skip() is correct this should be the case, but I wonder...). -- Lapo Luchini - http://lapo.it/ ?UNIX is user-friendly, it just chooses its friends.? (Andreas Bogk)