Gabriele Bulfon
2010-May-10 10:22 UTC
[zfs-discuss] Daily snapshots as replacement for incremental backups
Hello, I have a situation where a zfs file server holding lots of graphic files cannot be backed up daily with a full backup. My idea was initially to run a full backup on Sunday through the lto library on more dedicated tapes, then have an incremental backup run on daily tapes. Brainstorming on this, led me to the idea that I could actually stop thinking about incremental backups (that may always lead me to unsafe backups anyway for some unlucky reason) and substitute the idea with daily snapshots. Actually, the full disaster ricovery is on the Sunday full backups (that can be safely taken away on Monday), while the daily solution would be just a safe place for daily errors by users (people who delete files by mistake, for example). This can be done simply running a snapshot per day during the night. My idea is to have cron to rotate snapshots during working days, so that I always have Mon,Tue,Wen,Thu,Fri,Sat snapshots, and have the cron shell delete the oldest (actually, if I have to run a Mon snapshot, I will delete the old Mon snapshots, this should run the cycle). My questions are: - is this a good and common solution? - is there any zfs performance degradation caused by creating and deleting snapshots on a daily basis, maybe fragmenting the file system? Thanx for any suggestion Gabriele. -- This message posted from opensolaris.org
Erik Trimble
2010-May-10 12:00 UTC
[zfs-discuss] Daily snapshots as replacement for incremental backups
Gabriele Bulfon wrote:> Hello, > I have a situation where a zfs file server holding lots of graphic files cannot be backed up daily with a full backup. > My idea was initially to run a full backup on Sunday through the lto library on more dedicated tapes, then have an incremental backup run on daily tapes. > Brainstorming on this, led me to the idea that I could actually stop thinking about incremental backups (that may always lead me to unsafe backups anyway for some unlucky reason) and substitute the idea with daily snapshots. > Actually, the full disaster ricovery is on the Sunday full backups (that can be safely taken away on Monday), while the daily solution would be just a safe place for daily errors by users (people who delete files by mistake, for example). > This can be done simply running a snapshot per day during the night. > My idea is to have cron to rotate snapshots during working days, so that I always have Mon,Tue,Wen,Thu,Fri,Sat snapshots, and have the cron shell delete the oldest (actually, if I have to run a Mon snapshot, I will delete the old Mon snapshots, this should run the cycle). > My questions are: > - is this a good and common solution? >Yes, though of course you realize that snapshots are not a disaster-recovery mechanism. They''re not really backups, either, in the sense that they provide no security against larger-scale failures.> - is there any zfs performance degradation caused by creating and deleting snapshots on a daily basis, maybe fragmenting the file system? >No. Well, that''s not strictly true, but you won''t run into any issues with snapshots until you have a very large number of them simultaneously. 1000s, or more. Snapshots don''t fragment the file system any more than deleting files does. Taking snapshots is instantaneous, while deleting a snapshot can vary in time from virtually instantaneous to taking several hours (or more), if you have dedup turned on and have a large amount of data (and, don''t have sufficient L2ARC or RAM to hold the dedup table). In the latter case, it will impact performance, as the entire pool has to be scanned to allow for proper deletion of the deduped snapshot (i.e. it has to scan the entire pool to figure out which data is deduped, and what can be safely deleted).> Thanx for any suggestion > Gabriele. >-- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800)