Generating Random Data in Linux

Published by Christian Mohn · Read in about 1 min (165 words)

I’ve been fleshing out a proper Veeam Backup & Replication Demo lab at work, but doing demos on static VMs isn’t all that much fun and doesn’t really give us much. Doing scheduled backups of non-changing data is really boring.

So, in order to get some changes done on the file system on a few Linux VMs running in the environment, I came up with the following solution:

I set up a crontab entry that generates a file with random data in it a couple of times a day, just to make sure that there are some changes made to the VM. The crontab entry looks like this:

0 03,09,13,22 * * * head -c 1G </dev/urandom >/tmp/randomdata

This generates a 1 GB file called _randomdata _in /tmp filled with content from /dev/urandom at a couple of different times a day. This ensures that there are at least 1GB of changes for each backup cycle, and gives Veeam Backup & Replication something to work with.

Post last updated on January 2, 2024: Add author

About

vNinja.net is the digital home of Christian Mohn and Stine Elise Larsen.

The primary focus is on IT architecture and data center technologies like virtualization and related topics, but other content also pops up from time to time.

Sponsors