Generating Random Data in Linux

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.

About the author

Christian Mohn is a Senior Solutions Architect and Tech Lead SDDC for Proact in Norway.

See his About page for more details, or find him on Twitter.

Sponsors