Linux backup

Automating the backup of our Linux machines would seemingly be something that is trivial. 1and1 provides ample FTP space for this purpose, so you would think that there would be instructions or a script or something that would set this up easily.

Setting up a script to run took a bit of time, but mainly just because the commands were relatively new to me. Of course, most are similar to DOS, but there are enough differences that it takes some trial and error to get something working. I compromised in skipping the automatic naming of files with a date in their file names, instead opting for the simpler file1, file2, file3 to keep track of several versions. They are date stamped, so you don't really lose anything, except perhaps a little elegance in the script.

One problem that I am glad to have found and fixed prior having a critical issue was with the tar program. I suppose because it is so old, many versions of tar actually only store 100 characters for the file name. Since this includes the path, in some cases, the file names (and maybe path) will get truncated. No warning, no error, just loss of parts of file names. The solution is to use gtar instead, which is nearly identical but without the restriction.

Yet to do: figure out how to backup the hidden files.

AttachmentSize
backup.sh.txt2.29 KB