usr/local/bin/dokku postgres:export myapp > "/home/dokku/db_backups/myapp-`date +%Y-%m-%d`.dump" Create a shell scriptĬreate a new file in /home/dokku and name it backup_db.sh. Great, SpiderOak is all configured! Time to setup our database backups. The output should look like this: Including.Ĭurrent selection on device #2: u'myapp-droplet' (local)ĮxcludeFile:/root/SpiderOak Hive/.Icon.pngĮxcludeFile:/root/SpiderOak Hive/Desktop.iniĮxcludeFile:/root/SpiderOak Hive/.directory Then we include this folder in SpiderOak: SpiderOakONE -include-dir=/home/dokku/db_backups Let’s create a folder for our DB backups mkdir /home/dokku/db_backups Wait until the end of the syncing process. Enter a descriptive name, something like myapp-droplet. Simply press Enter as suggested to set up a new device. To reinstall a device, enter the id (leave blank to set up a new device):ĭon’t type any number. You will have to provide your SpiderOak login info. What will we do? Simple, we just run the following command: SpiderOakONE -setup=. We must now configure SpiderOak but we don’t have any GUI on our server. You’re now ready to install SpiderOak apt-get install spideroakone Look at it straight in the eye and IGNORE IT without showing mercy. If you get the following error: W: GPG error: release Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A6FF22FF08C15DD0 Open your sources.list file nano /etc/apt/sources.listĪnd add the following line at the end: deb release restricted Log to your DigitalOcean droplet by typing: ssh Note that if you don’t mind syncing your personal Hive on your DigitalOcean droplet, you can leave the option enabled. Still on your local workstation, go to your SpiderOak preferences: For this reason, we should disable the Hive Folder syncing. You put something personal in your Hive on your local computer and oops, it will be sent to your droplet! That sounds not very good to me. One problem of using the Hive for our backups is that it will sync everything. It is a convenient way to have things running quickly without configuring shared folders manually. All files added to the Hive folder of a device are automatically synced to the Hive folder in every other devices. SpiderOak creates the SpiderOak Hive folder in the installation process. You can leave the default options for now: Next step is to register your local computer with SpiderOak.įinally, you will be presented a screen to select what you want to sync from your local computer to the cloud. You should be presented with the following screen: Then, choose the correct client for your distribution: On the SpiderOak page, click on downloads We will first install the client on our local workstation and create our account. Thanks to NoName in the comments for asking me to clarify this point. After that, the cost is $7 per month for 30 GB storage. UPDATE: Whilst SpiderOak is not free, they offer a 60-days free trial for 2GB storage (no credit card required). Their zero-knowledge architecture will make sure our data remains private. We will use SpiderOak to store our backups. It’s not a question of not having enough money to pay someone else, it’s because we are smart and resourceful! See, it already feels better when we see it in this light! We are freelancers (or small development teams) and we are used to get our hands dirty and do stuff by ourselves. Sure, you can enable weekly backups of your whole droplet on DigitalOcean (the cost is minimal), but for a database it is wiser to backup at least once a day. If you haven’t read the first part, you should do it before reading any further. Get in on SpiderOak now and you'll enjoy a brand new version of the app, complete with a gorgeous user experience and seamless syncing across platforms and languages.Now that we know how to setup a rails application using Dokku on a DigitalOcean droplet, it might be a good time to think about automating our database backups. Because your personal files are important. With end-to-end encryption, ONE ensures all of your data is protected before it even leaves you computer, and is encrypted again while in transit to, and at rest on SpiderOak servers. Shouldn't you keep it safe? SpiderOak ONE ensures that your data is safe regardless of what comes you way, providing secure, reliable backup to protect your files from data loss and ransomware. You create new data every day, from important documents to photos.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |