Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As the dust user, create a bash script with the following contents:.

bin/periodic_snapshot.sh:

Code Block
languagebash
#!/bin/bash
# periodically create a snapshot in the snapshots directory
mkdir -p
snapshots
cd snapshots

# remove old snapshot files
find . -name "Snapshot*.tar.gz" -mtime +14 -exec rm {} \;

# create the snapshot
/opt/dust-voyager/bin/network_snapshot -u dust -p dust

Make sure the periodic_snapshot.sh file is executable.

Create the snapshots directory.

As the dust user, create a cron job by running crontab -e and entering a line to run the periodic_snapshot script periodically:

...