I have developed a concept which reduces the power consumption and uptime of my network attached storage.
The system is therefore intelligent because it is recognizing that its needed or not on its own and sets to standby.There are many methods out there how to do that but none of them worked for me quiet well because the system turned off when i was coping files what was not really meant to be. For doing it my way i am using simple bash scripts which i would like to share with you and explain. Continue reading →
Why does nobody a backup if everybody is talking about it? Using a unix-system with rsync it is that easy!:
First you should know some things about rsync: its an network protocol for synchronizing files. The interesting thing about rsync is that it is able to compare parts of a file and if it is needed sync only that parts. For example if there was changed one line of a config-file it will only transfer the information of that line through the network. Thats why rsync is really lightweight and fast. I am backing up my Linux-systems using rsync. I want to show how i created a backup script and how it is working.
-a is short for following commands:
-r copies the subfolders too
-l copies symbolic links
-p preserve permissions of the source file
-t preserve timestamps of the source file
-g preserve group permissions of the source file
-o preserve user rights of the source file (root only)
-D preserve device files (nur root)
-z Use compression (if you are storing your backup to a network attached storage)
-c skip based on checksum, not mod-time & size (take more time but is saver)
‘-e ssh’ defines the remote shell
–delete delete extraneous files from dest dirs
–stats Exports some stats
‘–exclude=foobar’ excludes the mask ‘foobar’
In the target path there is “$(hostname)” included. That is needed if you want to back up more then on system in the same path because it creates a folder named by the hostname. (for example “claw-desktop”)
Logs are exported to /var/log/ with the date year-month-day: “backup$(date +%Y%m%d)”
I am running this script as cronjob (crontab) as root and for target i use a samba mountpoint.
If you have any question or suggestions feel free to contact me.