Re: Copying one's home directory to an external hard disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The best way - depends on what you need.

Here is what I do -

Each night, I have a cron job that mounts an external drive and I copy files.  Here is a snippet:
#!/bin/bash
### backup to usb drive ###
# Ensure the device is plugged in
if [ ! -b /dev/USB-500GB-EXT ]; then
        exit 1
fi

# Mount the backup mount point
mount /backup


echo "*******************************">>/backup/backup.log
echo "Start Backup">>/backup/backup.log
date>>/backup/backup.log


echo "/home/klee/ - processing ...">>/backup/backup.log
# Copy data from /home/klee
cd /backup
mkdir /backup/home
mkdir /backup/home/klee
cd /backup/home/klee
cp -a -u -v --reply=yes /home/klee/ /backup/home/

date>>/backup/backup.log
echo "Backup Complete">>/backup/backup.log
cd /root

# unmount the backup mount point
umount -l /backup


###############################################

From work, I use rsync.  With a windows laptop, I would use rsync and ssh with cygwin.  Here's a sample of that script:
@echo off
setlocal

set PATH=c:\cygwin;%PATH%
set CYGWIN=binmode tty
set TERM=ansi
set USERNAME=klee
set HOME=c:\cygwin
set RSYNC_RSH=ssh.exe

@echo on
c:
cd "\My Documents"
rsync -e c:\cygwin\ssh -va ./ username@ipaddress:/home/klee/mydocuments/

endlocal


Hope that gives you some ideas.  For this to work, I have a dedicated server at home and spend an extra 5 dollars a month for a static IP address.  This way I can SSH to my Home PC anytime I need from just about anywhere I have an internet connection.  This has really helped when I needed to get a hint from sourcecode I had at home.  Just a quick SSH terminal session, and I had what I needed.

Ken

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux