Posts Tagged SFTP

Basic Ubuntu VPS server backup via FTP or SSH SFTP

In my quest for the perfect “in my dreams” backup solution for my Ubuntu VPS, I created this very simple script which can be run as a cron job and can be easily modified to backup any amount of data to any remote FTP or SFTP server.

You could very easily include a database backup by running mysqldump beforehand, but I’m not including it in this script.

This required yafc to be installed, but Ubuntu installations can easily install it by running

sudo apt-get install yafc

And now, for the script:

# format of the open command is proto://username:password@HOSTorIP/
# proto is either ftp or ssh
# special characters in the username or password are not well tolerated
# anything in the EOF tags are direct commands to yafc. Test if unsure
DIR=`date +%F`
yafc <<EOF
cd backup-dir
mkdir $DIR
cd $DIR
put -p -r *

Enjoy! Questions, comments, and feedback are welcome and appreciated. Thank you!


, , , , , , , , ,

Leave a comment

Easy network file management over SSH in Ubuntu

In my opinion, one of Ubuntu’s strongest tools is nautilus’ (the GNOME file manager’s) strong integration with remote files, such as those located on remote FTP, SFTP, WebDav, etc.

While Windows has integration, it’s severely limited and really only supports drag-and-drop copying/pasting and open-in-place documents. Compared to nautilus’ ability to edit-in-place and supporting full file operations, Ubuntu really gives the web developer a strong and convenient set of tools that Windows can’t provide without third-party software.

In the following steps I’ll explain how to connect to an SFTP (SSH) server via nautilus’ built-in networking functions.

Step One

Open Places > Network

Click for full-sized image

Step Two

Select SSH and enter your connection details

Click for full-sized image

In this step, you can check “Add Bookmark” and enter a bookmark name. Your bookmark will be added to the “Places” menu for one-click access to your network location!

Step Three

Enter your password when prompted.

Click for full-sized image

Step Four

Browse and enjoy!

Click for full-sized image


Questions, comments, and feedback are welcome and appreciated!


, , , ,

Leave a comment