[SWLUG] Network backups

Neil Greenwood neil.greenwood.lug at gmail.com
Sun Sep 10 12:47:40 UTC 2006


sudo is your friend!

You don't need the root password, just use the first user account you
created during installation. This is set up to have access to all
admin commands through sudo.
When it prompts you for a password, enter *yours*, then the command
runs with root priviledges.

To change the users who can run commands, you might be able to use the
'User Priviledges' tab on 'Users and Groups' on the System >
Administration menu. You can definitely change it using the 'visudo'
command from a terminal. The format of the file is documented at 'man
sudoers', although I've just simply got the following line at the end
of the file, where my user is neilg:

neilg   ALL=(ALL) ALL

This lets me run as root every command that's installed. neilg was the
user that the installer created, and I don't think I've changed this
line in the file.

To summarise, change your command from:
  rsync -e ssh -varuzP /home bkp_server:/media/data/homebkp
to:
  sudo rsync -e ssh -varuzP /home bkp_server:/media/data/homebkp

and it should copy all users' files.

Cheers,
Neil.

On 10/09/06, Glenn Booth <d.glenn.booth at gmail.com> wrote:
> Hi All,
>
> I wonder if anyone can offer me some advice on backing up an Ubuntu server
> over a (local) network to
> a second Ubuntu host.
>
> I was planning to use a simple rsync script, but I'm not clear on how to set
> it up so that the user that 'rsync'
> runs as can get access to all the necessary files.
>
> I need to backup the entire /home directory (there are four users, and about
> 130 gigs of data to
> back up). My first effort with rsync went like this (at the machine to be
> backed up):
>
> glenn at alfie:~$ rsync -e ssh -varuzP /home bkp_server:/media/data/homebkp
>
> where bkp_server is the host where I want to put the backup.
>
> This worked fine for files owned by me, but barfed (for what now seem
> obvious reasons) on files
> owned by other users.
>
> So, to the question. Should I just enable the Ubuntu root account(s) and do
> the backup as root, or
> is there a better way? This is a one-off job so that I can rebuild the
> server. I don't need it to be
> automated in any way.
>
> Any suggestions gratefully received!
>
> Thanks,
>
> Glenn.
>
>
>
>
>
>
> _______________________________________________
> SWLUG Discussion List - Discuss at swlug.org
> http://swlug.org/mailman/listinfo/discuss
>
>
>



More information about the Swlug mailing list