NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
GFNV
Apr 24, 2018Tutor
Backup, snapshots Best Practices
Looking for best practices for both Backups and Snapshots - including:
- a clear differentiation between the two, why use backup vs. snapshot
- why & when to use each,
- snapshot & bac...
StephenB
Apr 24, 2018Guru - Experienced User
Snapshots first:
Snapshots are a feature of the BTRFS file system that the NAS uses. They are functionally similar to the "previous versions" function in windows - and in fact, if you right-click on a NAS file from Windows you can restore older versions of the file.
When you create a snapshot of a share, initially it uses no space. Instead, the snapshot and the main share both reference exactly the same files. Over time, as you change the share (particularly deleting and changing files), the snapshot and the main share will begin to diverge, and the snapshot will begin to use space. There is an example I posted a couple of years back that might help you understand how this works: https://community.netgear.com/t5/ReadyNAS-in-Business/ReadyNAS-312-Need-Help-Understanding-Snapshots/m-p/936586#M3041
Snapshots are a handy way to retrieve older versions of files, but they do have some drawbacks. If you modify a file that is also in the snapshot, then the main copy of the file becomes fragmented. That can hurt NAS performance, so if a share contains a lot of files that are constantly re-written, you should leave snapshots turned off. Two examples: a share that is used for downloading torrents (say with transmission) is a bad candidate for snapshots, because the random blocks downloaded by the torrent will heavily fragment the share. Similarly, a share that holds an active SQL database is a bad candidate for snapshots, because the database updates will fragment the database. An iSCSI LUN also shouldn't use snapshots for similar reasons.
Snapshots are managed using the share settings wheel. Personally I use the "custom" snapshot settings on the NAS, because that gives me control over retention. For most shares, I use the settings shown in the screenshot below.
These settings take snapshots daily (around midnight) if the share contents have changed since the previous snapshot was taken. Retention is three months. I can roll back to older versions from the NAS web UI or by right-clicking in Windows and using it's previous versions function. What I can't do is browse the snapshots directly from Windows (which I see no need to do).
Some people might prefer snapshots taken more frequently, but daily works out well for me.
The NAS also offers "smart" snapshots. These are taken frequently and over time are "thinned out".
- Hourly snapshots are kept for 48 hours.
- Daily snapshots are kept for four weeks.
- Weekly snapshots are kept for eight weeks.
- Monthly snapshots are kept for as long as there is sufficient capacity. (The last weekly snapshot in a month becomes the monthly snapshot for that month.)
The indefinite retention of the monthly snapshots is why I don't like "smart" snapshots. Over time they take up a lot of space, and I need to manually delete them.
BTW, if you do want to delete snapshots to free up space, the best strategy is to delete the oldest snapshots first. They are the ones that are most diverged from the current share, so you free up the most space by doing that.
If you are running a backup job on the NAS, and the source of the backup is also on that same NAS, then the backup job will make a snapshot, and then back up that snapshot. That ensures that the backup is coherent (no files change while the backup is made). After the backup, that snapshot is deleted. If your backup source is remote, then this technique isn't used, so you do want to make sure the backups are scheduled off-hours.
Snapshots can't be used as backups because
- they are stored on the same machine, so will be lost if the NAS or it's RAID volume fails.
- data that hasn't changed is held in common with the main share (and other snapshots). So any damage in the main share usually also damages the snapshot.
- they will be automatically be deleted by the NAS if the file system gets too full.
- StephenBApr 24, 2018Guru - Experienced User
Backups next:
The backup options are explained in some detail here: https://kb.netgear.com/29788/ReadyNAS-Backup-FAQ
I don't think there is a "best practice" here, other than to actually put a backup plan in place. Most people here are using USB drives.
My own strategy for local backup is to back up to another ReadyNAS. The two best approaches for this are
- Rsync (incremental) backup. Rsync over ssh is a variation on this.
- ReadyDR
ReadyDR is related to the snapshot capability of the BTRFS, and you can think of it as a kind of remote snapshot. It is very space efficient, and is a good way to back up iSCSI LUNS (which are very large files).One aspect is that it is not a "highly available" backup. You need to restore the ReadyDR backup to a share in order to access the files.
Personally I want a highly available backup (where I can access the backed up files immediately). So I use rsync - creating one backup job for each share on the NAS. Daily backups are sufficient for my purposes. My backup NAS are on a power schedule, so they wake up daily, do their backup, and then shut down. Since they aren't running all the time, I need to run the backups on the receiving NAS (sometimes called a "pull" backup). That means that the NAS won't take a snapshot when the backup is made (as described in the previous post). Since I want the backup to be a copy of the source NAS, I set the rsync advanced option to "delete files that are no longer on the source". Most of the backup jobs send me email notifications when they fail (but not when they succeed). One backup job on each NAS is set to send me an email notification whenever it runs, so I have positive notification that the backup NAS is still functioning.
Here's the only connection to snapshots for me: I also have custom snapshots set on my OS-6 backup NAS. Those snapshots are taken shortly before the backups start. That gives me some versioning - I can roll back to older files on the backup NAS, as well as the main NAS. The snapshots aren't exactly the same, but they are pretty close.
rsync-over-ssh offers the same features of rsync, but the data is sent over an encrypted connection. If the backup machine is in another location and reached over the internet, then you should use rsync over ssh.
Another aspect of a backup plan is disaster recovery - what happens if the site is heavily damaged, so both the NAS and any local backups are destroyed? I use CrashPlan's small business cloud backup for that (though I am really a home NAS owner). Crashplan runs on a PC that has the NAS data volume mapped as a network drive. It took some months to get the full NAS backed up to Crashplan, but it easily keeps up (since my files don't change too quickly). Some folks alternatively use Amazon cloud storage, or store backups on USB drives off site.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!