Scheduled Backups of Home Directory

rpowersau at gmail.com rpowersau at gmail.com
Mon Aug 14 12:11:56 UTC 2006


On 8/15/06, Gabriel M Dragffy <dragffy at yandex.ru> wrote:
> On Mon, 2006-08-14 at 03:41 +0100, mattskr wrote:
> > This is what I do to copy my home directory nightly to a USB hard
> > disk...
> >
> > Run -> sudo crontab -e
> >
> > to open roots cron
> >
> > Add this line:
> >
> >
> >
> > * 2 * * * rsync -av --delete --update /home /media/usbdisk
> >
> > Change your output direcotry, close the file, and your done. Been
> > working fine for almost a year, and I had restore my files from backup
> > once.
> > It backups nightly at 2 AM copying only files that changed and deleting
> > any files that have been deleted in /home that day.
> > mattskr
> >
>
> Hi this is a good script and I have been using rsync with a very similar
> command for some time now. However, one thing is missing. It backs up to
> a USB hard disk and any and all files/folders copied there have the
> permissions and ownership changed to the current user AND 755, which is

It shouldn't. From the man:

-a, --archive               archive mode; same as -rlptgoD (no -H)

which includes:

-p, --perms                 preserve permissions

Have you been using the -a option?

> not the best of things. I've been working on writing a script that will
> make a text file listing the permissions of the actual files and letting
> this run automatically, but my skill is not good enough - anyone can
> help?
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>


-- 
Regards,
Russ




More information about the ubuntu-users mailing list