How to make a backup of your data with Areca on a local or USB disk or via (W)LAN to a remote Pardus 2008/2009 computer
(→Creating Crontask) |
(→Areca + WOL and remote FreeNAS server) |
||
| Line 139: | Line 139: | ||
If Areca locks-up during the "backup new target" process because of some problems, wait ~3 minutes for Areca to automatically unlock itself. | If Areca locks-up during the "backup new target" process because of some problems, wait ~3 minutes for Areca to automatically unlock itself. | ||
= Areca + WOL and remote FreeNAS server= | = Areca + WOL and remote FreeNAS server= | ||
| − | + | WOL information >> http://en.wikipedia.org/wiki/Wake-on-LAN | |
| − | WOL >> http://en.wikipedia.org/wiki/Wake-on-LAN | + | |
| − | FreeNAS | + | FreeNAS information and manual >> http://freenas.org/freenas |
==Installation and basic settings of FreeNAS on server computer== | ==Installation and basic settings of FreeNAS on server computer== | ||
Tested with FreeNAS-i386-LiveCD-0.7.2.5266.iso. | Tested with FreeNAS-i386-LiveCD-0.7.2.5266.iso. | ||
Revision as of 11:17, 30 October 2010
Contents |
Installation of Areca
To install Areca on Linux, download the latest release from Areca's website. This manual is made with areca-7.1.5-linux-gtk-32.tar.gz and also tested with Areca 7.1.6 (and higher).
- In Dolphin right-click on the downloaded areca...tar.gz > Extract archive here.
- To start Areca simply start the file areca.sh which is in the directory "areca".
Required change for Areca 7.1.5 (not for version 7.1.6 and higher)
Because of a problem with respect to the current version of gtk2 in Pardus 2009 it's necessary to modify the file /areca/bin/areca_run.sh.
Open this file in KWrite and add the following bold line.
#Options JAVADIR=/usr/java export GDK_NATIVE_WINDOWS=true
and Save /areca/bin/areca_run.sh (this problem has beeen solved in the release 7.1.6 of Areca).
Creating a Menu entry
To make a entry in menu right-click on the Menu icon > Menu Editor.
- Select the Submenu [1] in which the menu item for Areca will be placed.
- Make a New Item [2].
- Enter the name [3].
- Create the item [4].
- Goto [1] the location of the file areca.sh and select this file.
- Goto [2] > Other icons > Browse... > ../icons/ the location of the icon file [3] and select ico_72.png > Open.
- Save [4] the menu entry.
General information
For a general manual of Areca have a look here.
Areca will need a directory where it will store the configuration of your backup settings (what files to backup, where to store them, which files types must be filtered, whether the backups are compressed or encrypted, and so on). This "configuration directory" is called a "workspace".The settings for each group is saved in a group_name.xml file in the workspace directory.
After the first start of Areca select Workspace > Preferences... > Startup > mark Open this workspace: and choose the location for this "configuration directory".
Backup to a local directory on a hard disk or mounted usb device
Add new group in Areca
- Open the Edit [1] dialog.
- Add a New group [2].
- Enter a name [3] for this group.
- Save [4] this group.
Add new target in Areca
When you want to use a USB-stick/hard disk be sure that the USB device is inserted and mounted.
The USB device should have this write access properties.
- Select group [1] in which the new target should be added.
- Open the Edit [2] dialog.
- Check if Main is selected and enter a name [3] for this target.
- Select the location [4] for this target.
- When the location is a USB device select the label [5] of the USB device on which the backup should be placed.
- Create an new folder [6] and name [7]in which the backup should be placed (this step is optional).
- Save [8] the location.
- Select the Source [8] dialog and drag-drop your file/directory from Dolphin/Konqueror to here [10].
- Save [11] the settings for this target.
Backup new target with Areca
- Select target [1] and open [2] the Backup dialog.
- Start backup [3] and if successful the result will be shown at [4].
Automatic backup with Cron Task Scheduler
For this the "Generate backup strategy commands..." option of Areca is used.
Required symlink
In order for these .sh scripts to work after the are placed in one of the /etc/cron.* directories, it is necessary to create a Java symlink.
Open a Konsole and enter the following command:
sudo ln -sv /opt/sun-jdk/ /usr/java
For Pardus 2009: none as kde-servicemenu-rootactions has been installed by default.
For Pardus 2008: install servicemenu-rootactions with sudo pisi it http://pakete.pardususer.de/pardus-2008/servicemenu-rootactions-2.4.7.1-2.pisi -y
Creating task
- Select target [1] for which the task should be created.
- Open Generate backup strategy commands... [2]>[2a]>[2b]
- At [3] are the values of my general recommendation and change them according to your wishes.
- The location of the generated script is at [4] and confirm with Save [5] and OK [6].
Moving generated scripts
We only have to move (as root) these generated script (.sh files) to the appropriate /etc/cron.* directory.
- Open Dolphin and goto the location + select one of the generated .sh files and right-click > Root Actions > Open File Manager here
- Move the files to:
..._group_1_every_1_days.sh > right-click > Move to > Browse > /etc/cron.daily > OK ..._group_1_every_7_days.sh > right-click > Move to > Browse > /etc/cron.weekly > OK ..._group_1_every_28_days.sh > right-click > Move to > Browse > /etc/cron.monthly > OK
and close Dolphin (2x).
Recovering a backup on a different computer
This are some tips on how to recover a backup to a different computer as the one the backup has been made on.
- Transfer the backup directory (or connect the backup device) to the second computer,
- Install the Areca software.
- Open Areca > Workspace > Import... > Source directory > Select... the backup directory > find/select the *.bcfg file > Import.
- Modify (almost always necessary) the path to the backup Directory: Select Target [1]@Creating task (see above) > Edit > Edit target.. > modify Local Repository > Save and the Archive should become visible in Areca.
- Select top archive > Run > Recover...
And if all is well the backup is recovered in the directory ...../rcv/ and you can transfer (in Dolphin) the files/directories to the required position. (if applicable - do not forget the hidden files in the recovered directory)
Backup to a remote Pardus 2008/2009 computer
Installation of required package on remote computer
On the remote (server) computer open the Package Manager and install the package vsftpd.
Activation of Vstpd:
In Pardus 2008:
Tasma > System > Service Manager > select vsFTP Deamon >
put a mark at {Run on startup} and activate the (green) Start button > close Tasma.
In Pardus 2009:
System Settings > Service Manager > goto vsftpd >
put a mark at {Run on start} and activate the Start service button >
wait for the green vsftpd flag > close System Settings
Firewall settings
Pardus 2008: Disable the Firewall.
Pardus 2009: (on remote computer) System Settings > Firewall Manager > NO mark at Block Incoming Connections
Restart the remote computer in order to activate the changes.
Add new target in Areca for ftp
- Select group [1] in which the new target should be added.
- Open the Edit [2] dialog.
- Check if Main is selected and enter a name [3] for this target.
- Set a mark at [4] and select the location [5] for this target.
- Enter the IP address [6] of the server and a valid user name and password [7] (see also remark below).
- Enter '/' or an already existing directory at [8] and Test [9] the connection.
- After using the Test [9] button you can change (if required) the Remote directory to a new directory which will be created on the first backup.
- Add the directory [8] (= optional) in which the backup should be placed (on the server the backup will be placed in /home/user_name/..).
- Save [10] the location.
- Select the Source [11] dialog and drag-drop your file/directory from Dolphin/Konqueror to here [12].
- Save [13] the settings for this target.
Remark: In order to make a backup of your .kde3.5 (P2008) or .kde4 (P2009) directory it's necessary to use your own user name and password at [7] because of the required privileges.
Backup new target with Areca for ftp
Look in chapter "Backup new target with Areca" above.
If Areca locks-up during the "backup new target" process because of some problems, wait ~3 minutes for Areca to automatically unlock itself.
Areca + WOL and remote FreeNAS server
WOL information >> http://en.wikipedia.org/wiki/Wake-on-LAN
FreeNAS information and manual >> http://freenas.org/freenas
Installation and basic settings of FreeNAS on server computer
Tested with FreeNAS-i386-LiveCD-0.7.2.5266.iso.
In order to install Freenas, 256 MB Ram is required and this can be reduced to 128 MB RAM + 256 MB Swap after installation.
Select 9) Install/Ugrade to hard drive/flash device, etc. > 3. Install 'full' OS on HDD +DATA +SWAP partition > Reboot and 2) Set LAN IP address.
From this moment on you can access/configure your freenas server through http://freenas.lan.ip.address/ with (default) Username:admin Password:freenas
To use the DATA partition: - Add the disk ad0 on the 'Disks|Management' page - Add mounting point on 'Disks|Mount Point|Manageent" with parameters: Disk=ad0, Partition type=MBR,, Partition number=2 Filesystems=UFS To activate Swap: - Enable swap space on the 'System|Advanced|Swap' with parameters: Type=Device, Device=/dev/ad0s3
Installation on my 1GHz PIII takes ~2 minutes.
To enable FTP: 'Services|FTP|Settings' mark Enable and Max. conn. per IP=0 Add user: 'Access|Users and Groups|Users' Name=..., Full Name=..., Password=..., Primary group=ftp, Home directory= browse and select
Settings on Pardus (client) computer
Open konsole and enter the following command(s):
Installing wol package
sudo pisi it http://pakete.pardususer.de/pardus-2009/wol-0.7.1-1.pisi
Getting MAC address of FreeNAS server
~ $ ping -c 1 freenas.lan.ip.address # IP address of FreeNAS server
#example: ping -c 1 192.168.0.210
PING 192.168.0.210 (192.168.0.210) 56(84) bytes of data.
64 bytes from 192.168.0.210: icmp_seq=1 ttl=64 time=0.135 ms
--- 192.168.0.210 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.135/0.135/0.135/0.000 ms
~ $ arp
Address HWtype HWaddress Flags Mask Iface
192.168.0.210 ether 00:50:bf:99:99:4f C eth0 #= mac:address:of:the:frenas:server
Creating Crontask
With reference to [Add new target in Areca for ftp] and [Creating task]
Generated script file ...._every_1_days.sh:
# Script generated by Areca v7.1.7 on Feb 20, 2010 1:45 AM # Target Group : "workspace" # Target : "freenas-210" # This script must be run every day. # Daily backup "/home/atolboo/.areca-717/bin/areca_cl.sh" backup -config "/home/juser/.areca/workspace/481893661.bcfg" # Merge after day 14 "/home/atolboo/.areca-717/bin/areca_cl.sh" merge -config "/home/juser/.areca/workspace/481893661.bcfg" -delay 14
Modified script file (in bold) for /etc/cron.daily and do [Moving generated scripts]:
wol mac:address:of:the:freenas:server # switch on the freenas server #example: wol 00:50:bf:99:99:4f sleep 110 # startup time (in seconds) of freenas server # Script generated by Areca v7.1.7 on Feb 20, 2010 1:45 AM # Target Group : "workspace" # Target : "freenas-210" # This script must be run every day. # Daily backup "/home/atolboo/.areca-717/bin/areca_cl.sh" backup -config "/home/juser/.areca/workspace/481893661.bcfg" # Merge after day 14 "/home/atolboo/.areca-717/bin/areca_cl.sh" merge -config "/home/juser/.areca/workspace/481893661.bcfg" -delay 14 sleep 60 # just to make sure it does the job wget http://admin:freenas@freenas.lan.ip.address/exec_raw.php?cmd=shutdown%20-p%20now # shutdown the freenas server # example: wget http://admin:freenas@192.168.0.210/exec_raw.php?cmd=shutdown%20-p%20now rm -f exec_raw.php\?cmd\=shutdown\ -p\ now # remove shutdown file
Power down of (freenas) server
To make sure that the server is reacting to the wol command, use the "8) Shutdown system" option on the server.