Backup Software

How Excluding Page File Affects VM backup

Using Nakivo Backup & Replication we see How Excluding Page File Affects VM backup in terms of backup window and space efficiency

When thinking about making backups as efficient and timely as possible to decrease backup time windows, our backup solution needs to be as efficient as possible.ย  This would include excluding any files that may be unnecessary to include in backups of VMware or Hyper-V virtual machines and replicas.ย  Nakivo Backup & Replication is a modern backup solution that is able to exclude unnecessary system files such as swap files by default.ย  The results in backup window reduction as well as backup storage and replica space can be dramatic.ย  Letโ€™s take a closer look and see how excluding page file affects VM backupย within Nakivo Backup & Replication.

How Excluding Page File Affects VM backup

Before we get into the nuts and bolts of Nakivo Backup & Replication and configuring the skip swap files option, what are swap files used for in virtual machines that are being backed up?ย  Swap files in a Windows OS and swap partitions in Linux are essentially used for the same thing.ย  They are used for โ€œvirtual memoryโ€ that is used to page out information that is temporary runtime data not stored in RAM.ย  Operating systems will free up RAM that is full using the swap files/partitions so that the faster RAM can be used for higher performance for priority processes.

Swap files/partitions are essential for a healthy running Windows or Linux system.ย  However, the contents of the swap locations are volatile and no purpose is served in retaining these in backups.ย  In fact, we are simply creating longer backup windows for backups to run and using more space for our backups unnecessarily.ย  Can the data contained in the swap files add up across backups?ย  Absolutely.ย  Letโ€™s say we had 20 VMs that had 4 GB worth of used swap data between them and we backed up these VMs for 30 days.ย  We simply have to do the math here.

  • 20 VMs x 4 GB x 20 days = 2.4 TB of unneeded/unusable data!

If we take a look at a sample Windows Server 2012 R2 server that has a system managed page file, we can see the amount of potential data that will unnecessarily be copied.

Windows-page-file-settings-and-space
Windows page file settings and space

How do we exclude these swap files from our backups?

Nakivo Backup & Replication does this for you automatically!ย  In fact, the setting to skip swap files is on by

default.ย  This is a global setting found in Nakivo Backup & Replication under the Settings menu >> General >> System settings.

Nakivo-Backup-Replication-general-system-settings
Nakivo Backup & Replication general system settings

Under the System settings >> Processing Options you will see the checkbox to Skip swap files and partitions during processing.ย  The bubble tip if you hover over the โ€œ?โ€ for help explains โ€“ โ€œIf selected, swap files and partitions will be skipped during backup or replication job processing.ย  This feature allows creating smaller backups.โ€

Choose-skip-swap-files-and-partitions-during-processing-
Choose skip swap files and partitions during processing

Testing the effect of the โ€œskip swap files and partitionsโ€ setting

The first thing we want to do is perform a full backup of a server with the โ€œskip swap files and partitionsโ€ setting configured.ย  In the resulting Nakivo Backup & Replication backup, as shown, we backed up 52.4 GB worth of data from the Windows Server 2012 R2 server.

With-skip-swap-files-enabled
With skip swap files enabled

What about the same server with the โ€œskip swap files and partitionsโ€ setting unchecked?ย  When we run the full backup against the same test virtual machine without skipping the swap file, notice the difference.ย  Backing up the same virtual machine without any change in other data results in 54.3 GB worth of data.ย  This is roughly 2 GB difference between the amount of data copied in the first full backup and the second full backup.

With-skip-swap-files-disabled
With skip swap files disabled

The difference between the two may seem trivial.ย  However, we are only looking at a single virtual machine.ย  What if you have 200 virtual machines that you are backing up and there is a 2 GB difference between backups when not skipping the swap file?ย  When doing the math, we can easily see how quickly the difference this setting makes will add up in terms of storage costs and backup time windows.

What about in memory data used by applications?

You may wonder, what about data in memory that havenโ€™t been written to disk such as with database applications?ย  This is where โ€œapp-aware modeโ€ comes into play.ย  With application aware backup and replication jobs, volume shadow copy writers force application data living in memory to be flushed to disk before the backup happens.ย  This allows for applications such as databases applications to maintain transactional consistency.ย  Any servers that run applications that need transactional consistency such as Microsoft SQL Server or Microsoft Exchange should use the app-aware backup mode to consistently backup these applications.

Application-aware-virtual-machine-backups-enabled
Application aware virtual machine backups enabled

Thoughts

Nakivo Backup & Replication is able to intelligently skip files that hold no value in backup data.ย  The swap files that are found in both Windows as well as Linux virtual machines, represent data that is used to page out data when system physical memory is needed for faster, high priority operations. ย We can see how excluding page file affects VM backups. ย By skipping these files and partitions we reap huge dividends in the time it takes for backups and replicas to complete as well as the storage space required to house both.ย  By using application aware backups, any in memory transactional operations are properly flushed to disk before the backup is taken of transaction critical systems such as Microsoft SQL Server and Microsoft Exchange.ย  For the most efficient use of time and storage resources, be sure to utilize the skip swap files and partition setting in Nakivo Backup & Replication.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.