So I set up an Ubuntu Server instance but need to backup my development folder on a regular basis. I've got SSH access so can access it via PuTTY and FileZilla. In PuTTY I use
tar -cvf [YYYYMMDD].tar [directory]/, when it's done I use
gzip [YYYYMMDD].tar and then use FileZilla to copy across the resulting [YYYYMMDD].tar.gz file.
Now I just need to remember to do this at the beginning and end of each day!
#!/bin/bash # declare DATE variable theDATE=$(date +%Y%m%d) tar -cvf $theDATE.tar www/ gzip $theDATE.tar