Here is my first draft. Please provide me feedback if you have any improvements, corrections, etc… The PDF w/screenshots can be reached via a TOR browser at: http://cronbackup.hqel763bw7mbj763bz5telf5nxqgyok6w7kg4jxayxbnu6zmg7txsnqd.onion/
Part 1: Make sure backups are configured and working through the graphical user interface.
1.1) Open your browser and access your Start OS server. Go to System Backups Create Backup.
1.2) Make sure you have a target location for your backups to be stored. You should also test the backups manually through the graphical user interface.
Part 2: SSH into your StartOS server and put it into a State to persist changes.
2.1) After you have SSH’d into your StartOS server, you should see a welcome message and a command prompt. My screenshots redact the exact host name of my server.
2.2) Enter the command below to put your StartOS server into a state to persist changes. If this is not done, then your changes will last only until the next restart of your server, at which point they will be overwritten.
sudo /usr/lib/startos/scripts/chroot-and-upgrade
Part 3: Determine the backup target identifier you wish to use.
3.1) To find the available backup targets, enter the command below.
start-cli backup target list
3.2) You will get a list of all of the available backup targets and their details. Select the one that you want based upon what you tested and confirmed in the GUI initial back up test at the start of this guide. The very first line for that back up target that you want will provide you the target ID. In my case it was cifs-6. My screenshots redact the exact host name of my server and the user name.
Part 4: Add an entry to the Root Level crontab for your StartOS server.
4.1) Enter the command below to edit your root crontab.
crontab -e
4.2) If this is your first time editing crontab on this server, it will prompt you with an option of which editor to use. Select option one, which is the nano editor.
4.3) After selecting that, it will bring you to an editor where you can modify the crontab entries. Any line that starts with a # is a comment and is ignored. The first time you open up crontab, it will be all comments and no scheduled commands. You can do your own research on scheduling using crontab to select the schedule that you want. Here we will only add one line with a command to create a backup and send the output to a text file. This will execute on the first day of every month at 5:30am. You will need to modify the command below for your target (mine was cifs-6) and for your StartOS server password (Psw is not a good password):
30 5 1 * * start-cli backup create cifs-6 ‘Pswd’ >> /root/CronBackup.txt 2>&1
4.4) After adding that line in the editor, your screen should look something like this:
4.5) When you are done editing, you use Ctrl+X to exit. And then Y to save your work or N if you wish to not save your work. After you say yes to save your work, it will show you the file name to write. Just hit enter to accept the default. If you want to list the contents of crontab without editing. You may use this command:
crontab -l
4.6) You should see something that looks like this:
Part 5. Exit from make persistent mode.
5.1) To exit from make Persistent Mode, just enter the command below:
exit
5.2) Your server will restart, and after it restarts, your cron job will be active.