Backup Tutorials

Backup Website and Email Encrypted Backup using a shell script on Ubuntu/Linux

In this tutorial, we will show you how to backup a website and then encrypt the backup before emailing it using only a shell script. This guide is for those who are running their web server on Ubuntu or another version of Linux. This is very useful as a website can be backed up automatically using cron, encrypted for protection, and emailed to a safe place.

Send Email with attachment from the command line in Ubuntu Linux

Sending emails with attachments from the command line in Ubuntu is easily accomplished using a tool called mutt. Mutt allows us to send emails non-interactively. That is, we can invoke mutt from a shell script and it will perform the specified tasks for us with no further intervention needed on our part.

We can also run mutt from a shell (such as bash) or even as a cron job and have it carry out our desired tasks.

Exclude files from Tar Archive

Tar is a UNIX/Linux utility which is used to compress files for storage in an archive. When we tell tar to compress and create an archive of a directory, it will go ahead and include all the files in that directory.

Sometimes we may want to exclude a particular file from an archive. Tar allows use a convenient option to specify a file or files to exclude when making the archive. The tutorial below shows how we do a tar exclude file operation by using the command line.