OK, some of you didnt like the duplicity tutorial as it is not friendly/automated enough.
Therefore, I come back over the so important issue of back-ing up with a Duply tutorial. There, now you cant say it was too complicated
So, suppose you have one of our FTP plans, either free or paid, it is irrelevant, it will work just as well, let's say our ftp server is bk02.prometeus.net your username is miaumiau and password AbCdEf. Of course, you will not have such simple passwords and it is not recommended to use them anywhere, but this is for an example only.
The following insructions are for debian 7.0(wheezy).
First, as always, make sure you have everything up to date:
Code: Select all
apt-get update
Code: Select all
apt-get dist-upgrade
Code: Select all
apt-get install duply
Code: Select all
apt-get install ncftp
Code: Select all
duply miaumiau create
You will be warned to make a copy of your profile and informed where it is stored:
You have been warned, now lets make a back-up of the directory "test" located in /rootCongratulations. You just created the profile 'miaumiau'.
The initial config file has been created as
'/root/.duply/miaumiau/conf'.
You should now adjust this config file to your needs.
IMPORTANT:
Copy the _whole_ profile folder after the first backup to a safe place.
It contains everything needed to restore your backups. You will need
it if you have to restore the backup from another system (e.g. after a
system crash). Keep access to these files restricted as they contain
_all_ informations (gpg data, ftp data) to access and modify your backups.
Repeat this step after _all_ configuration changes. Some configuration
options are crucial for restoration.
For this we need to modify the sample config file located where we have been told above: /root/.duply/miaumiau/conf
If you are comfortable with vi, use that to modify:
Code: Select all
vi /root/.duply/miaumiau/conf
Code: Select all
apt-get install nano
Code: Select all
nano /root/.duply/miaumiau/conf
You need to look at the file and locate this:
Code: Select all
GPG_KEY='_KEY_ID_'
Next line should look like this:
Code: Select all
GPG_PW='AbCdEf'
Now we need to set the ftp protocol and username/password as well as destination directories for back-up, all done in this line:
Code: Select all
TARGET='ftp://miaumiau:[email protected]/testduply'
All that remains to do for manual backups is to add the source, and this will be /root/test:
Code: Select all
# base directory to backup
SOURCE='/root/test'
For most needs, the above should work, you can launch it with:
Code: Select all
duply miaumiau backup
Code: Select all
duply miaumiau backup incr
We will use for this the wonderful scheduling tool called cron. We will modify the crontab to include this task, I will make it run daily at midnight:
Code: Select all
crontab -e
Code: Select all
0 0 * * * duply miaumiau backup incr
Now, please do not set all to midnight Italy time, even not all at the top of the hour, for example, try something like:
Code: Select all
5 5 * * * duply miaumiau backup incr
With minor changes (yum instead of apt-get) this can be done for centos based distributions too.
Please remember that back-ing up your files regularly is paramount in order to avoid the loss of data, be it as a hardware failure , hacking or simple neglect (overwrite or delete some important files by mistake). At times we can provide some back-up, but it will be unpleasant because will most likely not be at the time you needed it, will not be easy and may lack altogether (large storage servers we do not back-up at all). You should NEVER depend on your host's automated back-ups, be it Prometeus or any other, you know, there are 2 kinds of ppl in the world, those that didnt lose any important data and those that take regular back-ups. Let's make the third, those that do take regular back-ups without prior loss of data