6

Here's my scenario: I have two servers (well many more, but two for this scenario), one is a Solaris backup server, the second is a CentOS Linux Server. Every night the CentOS server runs a cron job to rsync itself to the Solaris backup server. After this is done, it puts the date and time into a special file on the Solaris server. The Solaris server has a cron job run every minute and if it sees this file, it grabs the contents and uses that to make a snapshot.

The result is great: Every day the backup automatically runs and then creates a ZFS snapshot. Been working great for over two months. I had expected that by now I would be low on space and would need to start (manually) deleting old snapshots. But in fact, I am fine on space. My only concern is, with 60+ snapshots and more being added daily, are there any known problems with large numbers of ZFS snapshots? Is there a maximum number of ZFS snapshots a ZFS filesystem can have? Or am I OK to just keep accumulating snapshots until I am low on space?

Josh
  • 9,190
  • 28
  • 80
  • 128
  • Note that after asking this I opted for a lot of snapshots using `cron`, and after 10 years and 42,000+ snapshots later I discovered that there's [a definite space impact](https://serverfault.com/questions/1057059/are-zfs-snapshots-really-free) even though performance was still fine. – Josh Sep 08 '21 at 21:35

2 Answers2

7

There's no problem with lots of snapshots. Having thousands of ZFS filesystems can cause boot times of more than an hour, but you're not doing that.

TRS-80
  • 2,584
  • 17
  • 16
  • unfortunately oracle have helpfully broken all their links so this answer is not very useful anymore – JamesRyan Jun 05 '13 at 10:31
  • 2
    @JamesRyan Fortunately the internet archive saved a copy, so I've updated the link in my answer. – TRS-80 Jul 04 '13 at 06:16
  • What do you think of creating a snapshot on every file change? Disregard temporary files or stuff in RAMFS/TMPFS. – CMCDragonkai Jun 27 '14 at 03:05
3

I wouldn't be too concerned about this. You're talking about 1 snapshot a day here. I have heard of production environments with over 10k snapshots. But I don't have any information on how this was working for them but I didn't hear it in a bad context so I'm going to assume that it was working well.

3dinfluence
  • 12,449
  • 2
  • 28
  • 41
  • Thanks a lot! I wish I could have accepted both your answer as well as TRS-80's answer... But your was almost equally as helpful! – Josh Oct 23 '09 at 15:28