Below are the manual Task’s I perform frequently on all self-managed Ubuntu serves I own (along with automated backups and update tasks).
Here is a post on automatically backing up a server to another via crontab entries. I have a number of Ubuntu Servers on Vultr and Digital Ocean (online cloud server for as low as $2.5 a month).
I also perform manual backups to ensure files are backed up.
Manual Backup Files.
First I create the following folder structure on my OSX desktop (for each server I need to backup).
My Server 01
- ~\Desktop\www.myserver01.com\
- ~\Desktop\www.myserver01.com\www
- ~\Desktop\www.myserver01.com\db
- ~\Desktop\www.myserver01.com\nginx
- ~\Desktop\www.myserver01.com\misc
My Server 02
- ~\Desktop\www.myserver02.com\
- ~\Desktop\www.myserver02.com\www
- ~\Desktop\www.myserver02.com\db
- ~\Desktop\www.myserver02.com\nginx
- ~\Desktop\www.myserver02.com\misc
etc (for each server)
I then use Forklift 3 (not a paid endorsement, I just love it) to manually backup files on the server. I manually copy files that are available via existing SFTP connections in Forklift (e.g WWW, MySQL, NGINX, MongoDB etc).
I simply drag and drop important file system files in Forklift (from the remote SFTP instance to a local folder).
SFTP copy progress can be viewed in Forklift.
fyi: SFTP is not the fastest transfer protocol. It appears only 39MB (4055 items) has been downloaded in 8 hours over ADSL (on a server that is over 400ms away).
FYI: Slow servers (ping) do not like like SFTP.
TIP: Consider zipping smaller files first (into one larger file) or using RSync instead.
Pre Zipping up files before backing up.
I used this command to pre-compress entire folders before downloading them over SFTP.
I created a bash script to manually prepare files to backup on each server.
Don’t forget to make the script file executable
Now I call the script to compress files before backup
TIP: Add other things to back up to the script (e.g MongoDB and MySQL).
Below is my script to backup WWW, NGINX, MySQL and MongoDB and zip them before copying over SFTP.
Thanks to this thread for MySQL export to separate file help.
Note: The warning “Using a password on the command line interface can be insecure.” will be shown when exporting a database from the CLI.
Now I can download the 4 outputted files manually from each server.
Snapshot Tasks
Taking snapshots in Vultr is a great way to backup too.
Manually Updating the Server
I also connect to the server via SSH and check for package updates
Now I can now manually update packages
Quick Reboot to ensure packages are updated.
More to come (on viewing logs (errors, firewall, stats), backing up php etc).
Here is a post on automatically backing up a server to another via crontab entries. I have a number of Ubuntu Servers on Vultr and Digital Ocean (online cloud server for as low as $2.5 a month).
Hope this helps someone.
Donate and make this blog better
Ask a question or recommend an article
[contact-form-7 id=”30″ title=”Ask a Question”]
Revision History
v1.0 Initial Version