Ideology
Projects
Manutenzione
| Making backups with rsync |
| Sunday, 06 June 2010 23:28 |
|
Very delicate operation in the digital environment is certainly back up the data according to their importance. Is just to prevent any damage hardware/software to be ready for this kind of unpleasant situations. There are several types of software to meet everyone's needs, according to the user. What is proposed is used from the command line and via ad hoc configuration you can set a cron table so that backups are performed automatically. Clearly by the crond daemon you can schedule daily, weekly and monthly operations of the various data storage. But not only. This operation can be performed at fixed times determined by the user.
The test was performed backup with rsync configured on Archlinux. The settings are valid for any GNU /Linux. Let a " pacman -S rsync ". For our basic setup will not need to set or modify any particular item. Rsync options are many. The purpose of the article is a basic configuration of the software in order to have a backup quickly and safely. We recall the command rsync -avz /folder/source /folder/destination and see that once launched the command destination folder choice we will populate with the information given in the source folder. Understandably we can add many source folders having the same destination folder, or even have a source folder and folders more destinations. This is completely full description of the user who uses it. Particularly depends on the kind of fussiness.
Decided folders that perform various backup you need to know what each will be made. Dispassionate advice is to evaluate the importance of their data. Maybe lose the mp3 songs is certainly less important than losing e-mail, OpenOffice or data file system configuration. Based on these principles put the music up a monthly, weekly for mail and configuration data and work we can set a daily basis. Who is responsible for operations management system is planned by the crond daemon. Navigate to the folder /etc/cron and then with a game tab, you can configure backups for the following periods:
# cd /etc/cron.
To schedule a weekly task simply access the directory /etc/cron.weekly and create a text file populated this way:
#!/bin/bash
Save with the name. The configuration is complete. The backup will start at 6 PM every weekend. Take note also that crond order to accomplish the transactions you request to be placed in/etc/rc.conf between daemons to run at startup. To set a preset time instead of the command syntax is as follows:
Date and time fields with their allowed values minuts 0-59
Examples
1 0 * * * rsync -avz /folder/source /folder/destination
5 4 * * sun rsync -avz /folder/source /folder/destination
30 7 * * 1-5 rsync -avz /folder/source /folder/destination
As you can see it has full possession of what setting you are using ad-hoc options even more special. Another solution is to edit the crontab and set with a table similar to that seen shortly before.
If you are habitual to take the personal computer/laptop on constantly will not have trouble creating files that will be read daily, weekly or monthly basis via /etc/crond.daily - cron.weekly and so on. If you have a particular need is to set a table of cron to schedule according to the options displayed.
For a more comprehensive and effective reference to manual pages using man pages man rsync and cron. |



Comments