DigitalOcean S3 compatible object storage called Spaces allows you to store and serve large amounts of data. They are easy to create and are ready to be used within seconds without any configuration. They are ideal for storing static unstructured data like audio, video and images as well as binary files, archives, backups etc.
What’s so cool about Spaces compared to Amazon S3 is the fact that their pricing structure is WAY more easier to understand and predict. For $5/month you get 250 GB of storage and 1 TB of outbound transfer (inbound/upload is always free). Every additional GB stored costs $0.02 and every additional GB transferred costs $0.01. On top of that you can even serve these files utilizing use their free CDN service at no additional cost! (This alone on Amazon CloudFront can cost you a little fortune!).
Now back to the main topic: mounting DigitalOcean Space as a folder on your server that can be used to store any kind of data.
1. To start with the process you’ll need to install s3fs and some dependencies for it to work normally:
sudo yum update
sudo yum install automake autotools-dev fuse g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
sudo make install
2. Next you’ll need to create a file that will hold your Spaces API Key and Secret Key (don’t forget to replace these keys with KEY:SECRET_KEY’ in the command below):
echo 'KEY:SECRET_KEY' > ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs
3. Now we need to create a folder that will be a mounting point for Spaces
4. Now we can mount the Space
s3fs SPACE_NAME /backup -o passwd_file=~/.passwd-s3fs -o url=https://nyc3.digitaloceanspaces.com -o use_path_request_style
If your space is not in New York than Amsterdam or somewhere else: replace nyc3 with ams3 or the whatever is correct.
By this point the your DigitalOcean space should be mounted at /spaces path and you’ll be able to use it just any local folder. You could copy files in and out, rsync data there etc. Note that accessing files in that folder is done over your networks since these files are actually hosted remotely and that will burn your server’s bandwidth. You can see that this folder is mounted if you run df -h in the command line. In case you need to unmount it for any reason:let’s say you’re writing a backup bash script where it will mount the Space copy backups over and unmount it when it’s done, all you need to run is umount /backup and it’s done!
If you reboot your system this folder will not get mounted again so in order for that to be done on the boot you’ll need to edit fstab file that is located at /etc/fstab. Open the file for editing in your favorite text editor and add this line at the end of the file:
s3fs#SPACE_NAME /backup fuse allow_other,_netdev,nosuid,nodev,url=https://nyc3.digitaloceanspaces.com 0 0
After saving the changes to fstab file run:
sudo mount -a
Now the Space will be auto-mounted on every server boot. Now you can host unlimited number of files there and access them easily. You can mount same Space on couple servers so they all can access them at the same time or use it for your backups… There are so many situations where this can be incredibly useful and I don’t have a doubt you’ll use this to create something really cool.
Recently, a Wall Street Journal posted an article claiming that Google accidentaly exposed private information of hundreds of thousands Google+ users over the course of last three years. Google found out about the security breach in March 2018 and quickly fixed the bug, but they kept silent about the issue.
Google+ was created back in 2011 as a social media network that should challenge Facebook and Twitter but never managed to grab any bigger attention. Many of Google or Gmail users don’t even know they have their Google+ account and their Google+ page since these are probably given by default. Some probably tried using once or twice and that’s about it but alot of users never actually used Google+ (including me).
Google is now thinking of shutting the service down but the exact date when the service will stop to work and exist is still unknown.
How to check if you have Google+ account?
Here’s a simple way how to determine if you have Google+ account: go to Gmail and at the right side of the screen click on icon next to a bell (probably with your picture/avatar) and you’ll see a window like this with a link to your Google+ profile.
How to check if you already have Google+ account?
How to close your Google+ page and with all data stored?
Apparently, sooner or later, Google+ will stop to exist. If you don’t use it and don’t plan to use it you can simply remove your Google+ account by following these simple instructions.
- Clicking on that Google+ Profile link like on a picture above will take you to your Google+ page. If you haven’t used it at all, it should look like this.
Typical Google+ page
- Here are a simple steps that will safely remove your Google+ page. While on your Google+ page, click Settings (as shown on the image above). Then on the settings page scroll all the way down to the and of the page and there you’ll have Delete your Google+ profile link:
Scroll down and find Delete your Google+ Profile link
- Clicking on that link will ask you once again to login to your Google account to confirm your identity and after a login you’ll see a page like this:
Confirm the removal your Google+ profile
- This page will contain all the information you need to know about removing your Google+ profile so read it carefully. If you agree with everything written there tick these two boxes and click Delete. Note that deleting of your Google+ profile can’t be undone so once you delete it – it’s gone for good! Also, removing your Google+ profile has nothing to do with your Google or Gmail account. These are totally different things and it won’t affect your Google or Gmail account.
- Once you have pressed the Delete button your Google+ account is gone! The page that follows is an optional survey where you can leave a feedback about why have you decided to remove your Google+ account.
Optional survey about reasons for deleting Google+ account
If you have followed the instructions above you now no longer have a Google+ account. Go back to your Gmail, give it a refresh and you’ll be able to see that your Google+ Profile link is now gone:
Google+ account removed
Also, if you try to load your Google+ profile page in your browser you’ll reach a 404 page, meaning that your Google+ page no longer exist:
Google+ Profile page removed
For the past several years I have been using Amazon S3 to backup my WHM/cPanel accounts. It works quite good but the problem is Amazon’s complex pricing model (that charges you for things like diskspace, bandwidth, requests) making price for the service is quite unpredictable. I’ve read on many places that people often got surprised at the end of the month receiving the bill from Amazon.
Recently I have started testing DigitalOcean Spaces, a service similar to Amazon’s S3 (S3 compatible alternative) but with a pricing structure anyone can understand: for $5/month you get 250 GB of storage and 1 TB of outbound transfer (inbound transfer is free like on S3). If you need more than that it will cost you 2cents per every additional GB of storage and 1cent for every additional of outbound GB. Also first two months for every new space are free!
Continue Reading →
While experimenting with s3fs I have also found out another tool written in go programming language that named Goofys. Like s3fs, this tool can also mount Amazon S3 bucket as a folder that can later be accessed just like any other local folder making accessing files in S3 bucket, backing up data or syncing files quite easy. Detailed installation manual for Goofys covers only Mac while Linux installation guide is basically non-existing, so this will be my guide on how to install Goofys and mount Amazon S3 bucket on an Ubuntu Linux. This has been tested on DigitalOcean droplet running a Ubuntu version 16.04.3 x64. If you’re also testing this out on a new VPS like me – make sure to execute apt-get update before you start.
But why would anyone want to use Goofys if s3fs is working fine? Well, according to benchmarks available at Goofys github main reason you would like to use this is performance! Goofys is much faster than s3fs. For some operations Goofys is ten times faster than s3fs making it the right choice for situations when you need access to S3 to be really fast (or as close as it being just a folder on the same drive).
Continue Reading →
If you’re a web developer developing in local environment you most probably use .dev for projects you are working on. If you’re using Valet on Mac development is quite simple since every folder from your projects folder is instantly accessible in browser if you just enter folder name and add .dev. It works like magic without messing with any hosts files. It just works!
But then Google decided to complicate things a bit. First they have forced all .dev domains to use SSL. Since December 2017 Google Chrome version 63 started redirecting to all .dev domains to secure protocol replacing http:// with https:// in your urls without even asking you. The reason for that is maybe somehow related to fact that Google bought the .dev making it a legit gTLD. They don’t sell these (yet) and the use for this, and for more than 100 other gTLD Google now owns (including .app, .foo), is unknown but for sure it’s going to complicate lives of web developers.
Continue Reading →