Koozali.org: home of the SME Server

RSYNC and Dungog

Adserg

RSYNC and Dungog
« on: February 11, 2003, 09:43:14 PM »
Help!

Has anyone used the backup package from dungog, ie backup/rsync

I have downloaded it installed it and followed the instruction's but i cant get it to login without prompting for a password. below is what i have tried.


On both my Sme servers ssh is enabled. (Sme 4.1.2 & 5.1.2)

I have created a user called rsa on both servers and did the following to
give him ssh shell access.
chsh -s /bin/bash rsa

I then try to get a login without  being prompted for a password, but
everytime it prompts me?
====================Documentation========================
To establish a secure connection without being prompted for a password you
need to install ssh authorized keys, select/create a user on both server
with enough permission to read the files you want to transfer, you may need
to make them a member of the group that owns the files or chown the files.
using root should work but is never recommended.

ADSE) I have to create a user on both servers (RSA) and add them to a group
that has enough permissions to get to my ibay's both called data and data1
ok this is done

===================Documentation=========================
Give both users shell access, as the user, use the program ssh-keygen to
create your encryption keys then copy the public key to the remote server
slogin to the remote server and add you public key to the file
authorized_keys, logout of remote, now you should be able to slogin to the
remote server from the local server without being prompted for your
password.
The following commands should be all you need.

  a.. ssh to local.server.net, cd to ~/.ssh  .....OK done
  b.. ssh-keygen -t rsa [accept file name id_rsa][don't enter a passphrase]
OK done

  c.. scp id_rsa.pub Ace.nefu.co.uk:.ssh/local.pub  OK done have to do it bi ip
address. (172.31.4.2)

  d..slogin 172.31.4.2, cat local.pub >> authorized_keys  (command doesnt work)
  f..so i use this to complete.     slogin 172.31.4.2
  cd .ssh
  cat local.pub >> authorized_keys
  h..But again i no joy.


 
 What do you do to install? something is missing? has anyone got a data sheet if  so can i have it?

Kind Regards

ADSE

Robert

Re: RSYNC and Dungog
« Reply #1 on: February 11, 2003, 09:57:23 PM »
Are you using the correct paths?
How about: cat ~/local.pub >> ~/.ssh/authorized_keys

Adserg

Re: RSYNC and Dungog
« Reply #2 on: February 11, 2003, 10:23:58 PM »
Cheers Robert i haven done that.

how long did it take you to complete? and do you have an instruction of install?

Thank you Robert

Regards

Adrian

Robert

Re: RSYNC and Dungog
« Reply #3 on: February 12, 2003, 01:26:59 AM »
I haven't actually installed that contrib, but from what you wrote I suspected that you had your paths wrong.
~/ is a shorthand notation for the user's home directory.
cat ~/local.pub >> ~/.ssh/authorized_keys
means append the contents of the file local.pub to the file authorized_keys in the directory .ssh in the user's home directory. This command assumes that local.pub is in the user's home directory. Otherwise, the command would be:
cat /full/path/to/dir/local.pub >> ~/.ssh/authorized_keys
If you follow the installation instructions for the contrib, local.pub should be in the user's home directory.

Hope this helps,
Robert

Adserg

Re: RSYNC and Dungog
« Reply #4 on: February 12, 2003, 06:20:30 PM »
Thank You Robert, i will trfy again on the infor that you have given to me.

Regards

Adrain

Adserg

Re: RSYNC and Dungog
« Reply #5 on: February 14, 2003, 08:10:29 PM »
Cant get it working...teddy's out the pram..

Back to searching for a server to server backup solution.

Thanks all

ADSE

Dennis Johansen

Re: RSYNC and Dungog
« Reply #6 on: November 14, 2003, 11:56:53 PM »
Adserg wrote:
>
>
> Cant get it working...teddy's out the pram..
>
> Back to searching for a server to server backup solution.

Hi there,

I'm using the following, and had survived a disk crash in the company.

Make a Ibay - e.g. backups :-)

And then see the following cron file. Must be in the /etc/cron.daily dir.

Change the parameters to your setup e.g. server name.

It makes a daily incremental backup and a weekly full backup.

/ Dennis
*************************************************************************
#!/bin/sh
# full and incremental backup script
# created 11 october 2002
# Based on a script by Daniel O'Callaghan
# and modified by Dennis Johansen

#Change the 5 variables below to fit your computer/backup


COMPUTER=jmvserver                                  # name of this computer
DIRECTORIES=/home/e-smith/files/ibays/pub/files/Dokumenter                    # directoris to backup
BACKUPDIR=/home/e-smith/files/ibays/backups/files/dokumenter                         # where to store the backups
TIMEDIR=/home/e-smith/files/ibays/backups/files/dokumenter/last-full                 # where to store time of full backup
TAR=/bin/tar                                  # name and locaction of tar

#You should not have to change anything below here

PATH=/usr/local/bin:/usr/bin:/bin
DOW=date +%a                    # Day of the week e.g. Mon
DOM=date +%d                    # Date of the Month e.g. 27
DM=date +%d%b                # Date and Month e.g. 27Sep

# On the 1st of the month a permanet full backup is made
# Every Sunday a full backup is made - overwriting last Sundays backup
# The rest of the time an incremental backup is made. Each incremental
# backup overwrites last weeks incremental backup of the same name.
#
# if NEWER = "", then tar backs up all files in the directories
# otherwise it backs up files newer than the NEWER date. NEWER
# gets it date from the file written every Sunday.


# Monthly full backup
if [ $DOM = "01" ]; then
        NEWER=""
   $TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DM.tar $DIRECTORIES
fi
      
# Weekly full backup
if [ $DOW = "Sun" ]; then
   NEWER=""
   NOW=date +%d-%b
            
   # Update full backup date
   echo $NOW > $TIMEDIR/$COMPUTER-full-date
   $TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
                     
# Make incremental backup - overwrite last weeks
else
                     
       # Get date of last full backup
   NEWER="--newer cat $TIMEDIR/$COMPUTER-full-date"
   $TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
fi