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

From PardusWiki
(Difference between revisions)
Jump to: navigation, search
(Creating Crontask)
(Installing wol package)
 
(23 intermediate revisions by one user not shown)
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=
This part is still ......{{UnderConstruction}}
+
WOL information >> http://en.wikipedia.org/wiki/Wake-on-LAN
WOL >> 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.
  
FreeNAS info and manual >> http://freenas.org/freenas
 
==Installing FreeNAS==
 
 
In order to install Freenas, 256 MB Ram is required and this can be reduced to 128 MB RAM + 256 MB Swap after installation.
 
In order to install Freenas, 256 MB Ram is required and this can be reduced to 128 MB RAM + 256 MB Swap after installation.
  
Line 156: Line 157:
 
  - Enable swap space on the 'System|Advanced|Swap' with parameters: Type=Device, Device=/dev/ad0s3
 
  - Enable swap space on the 'System|Advanced|Swap' with parameters: Type=Device, Device=/dev/ad0s3
 
Installation on my 1GHz PIII takes ~2 minutes.
 
Installation on my 1GHz PIII takes ~2 minutes.
  To enable FTP: 'Services|FTP|Settings' mark Enable
+
  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
+
  Add user: 'Access|Users and Groups|Users' Name=..., Full Name=..., Password=..., Primary group=sshd,
 +
Additional goup=ftp, Home directory= browse and select,  Mark at Grant access to the  user portal.
  
 +
==Settings on Pardus (client) computer==
 +
Open konsole and enter the following command(s):
 
==Installing wol package==
 
==Installing wol package==
 
  sudo pisi it http://pakete.pardususer.de/pardus-2009/wol-0.7.1-1.pisi
 
  sudo pisi it http://pakete.pardususer.de/pardus-2009/wol-0.7.1-1.pisi
 +
or
 +
sudo pisi it http://pakete.pardususer.de/pardus-2011/i686/wol-0.7.1-1.pisi
 +
or
 +
sudo pisi it http://pakete.pardususer.de/pardus-2011/x86_64/wol-0.7.1-1.pisi
  
 
==Getting MAC address of FreeNAS server==
 
==Getting MAC address of FreeNAS server==
   ~ $ '''ping -c 1 freenas.lan.ip.address'''      # IP address of FreeNAS server fi: 192.168.0.210
+
   ~ $ '''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.
 
  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
 
  64 bytes from 192.168.0.210: icmp_seq=1 ttl=64 time=0.135 ms
Line 192: Line 201:
 
  # Merge after day 14  
 
  # Merge after day 14  
 
  "/home/atolboo/.areca-717/bin/areca_cl.sh" merge -config "/home/juser/.areca/workspace/481893661.bcfg" -delay 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:
+
Modified script file (in '''bold''')  for /etc/cron.daily and do [[http://en.pardus-wiki.org/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#Moving_generated_scripts Moving generated scripts]]:
  '''wol mac:address:of:the:freenas:server'''  # switch on the freenas server fi:=00:50:bf:99:99:4f
+
 
 +
{{command | NOTE: '''the shutdown function isn't working at this moment with version FreeNAS-i386-LiveCD-0.7.2.5543'''}}
 +
  '''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
 
  '''sleep 110'''    # startup time (in seconds) of freenas server
 
   
 
   
Line 210: Line 222:
 
   
 
   
 
  '''sleep 60'''      # just to make sure it does the job
 
  '''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 fi:freenas.lan.ip.address=192.168.0.210
+
  '''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
 
  '''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.

Latest revision as of 10:35, 13 February 2011

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).

  1. In Dolphin right-click on the downloaded areca...tar.gz > Extract archive here.
  2. 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.

New item

  1. Select the Submenu [1] in which the menu item for Areca will be placed.
  2. Make a New Item [2].
  3. Enter the name [3].
  4. Create the item [4].

Add Areca

  1. Goto [1] the location of the file areca.sh and select this file.
  2. Goto [2] > Other icons > Browse... > ../icons/ the location of the icon file [3] and select ico_72.png > Open.
  3. 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

New group

  1. Open the Edit [1] dialog.
  2. Add a New group [2].
  3. Enter a name [3] for this group.
  4. 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.

New target

  1. Select group [1] in which the new target should be added.
  2. Open the Edit [2] dialog.
  3. Check if Main is selected and enter a name [3] for this target.
  4. Select the location [4] for this target.
  5. When the location is a USB device select the label [5] of the USB device on which the backup should be placed.
  6. Create an new folder [6] and name [7]in which the backup should be placed (this step is optional).
  7. Save [8] the location.
  8. Select the Source [8] dialog and drag-drop your file/directory from Dolphin/Konqueror to here [10].
  9. Save [11] the settings for this target.

Backup new target with Areca

Backup

  1. Select target [1] and open [2] the Backup dialog.
  2. 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

Required rootaction menu

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

Cronjob

  1. Select target [1] for which the task should be created.
  2. Open Generate backup strategy commands... [2]>[2a]>[2b]
  3. At [3] are the values of my general recommendation and change them according to your wishes.
  4. 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.

  1. Open Dolphin and goto the location + select one of the generated .sh files and right-click > Root Actions > Open File Manager here
  2. 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.

  1. Transfer the backup directory (or connect the backup device) to the second computer,
  2. Install the Areca software.
  3. Open Areca > Workspace > Import... > Source directory > Select... the backup directory > find/select the *.bcfg file > Import.
  4. 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.
  5. 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

New target for ftp

  1. Select group [1] in which the new target should be added.
  2. Open the Edit [2] dialog.
  3. Check if Main is selected and enter a name [3] for this target.
  4. Set a mark at [4] and select the location [5] for this target.
  5. Enter the IP address [6] of the server and a valid user name and password [7] (see also remark below).
  6. Enter '/' or an already existing directory at [8] and Test [9] the connection.
  7. 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.
  8. Add the directory [8] (= optional) in which the backup should be placed (on the server the backup will be placed in /home/user_name/..).
  9. Save [10] the location.
  10. Select the Source [11] dialog and drag-drop your file/directory from Dolphin/Konqueror to here [12].
  11. 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=sshd, 
Additional goup=ftp, Home directory= browse and select,  Mark at Grant access to the  user portal.

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
or
sudo pisi it http://pakete.pardususer.de/pardus-2011/i686/wol-0.7.1-1.pisi
or
sudo pisi it http://pakete.pardususer.de/pardus-2011/x86_64/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]

Crontask

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]:

NOTE: the shutdown function isn't working at this moment with version FreeNAS-i386-LiveCD-0.7.2.5543

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.

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox