Backup home directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Backup home directory
# 1  
Old 12-05-2011
Backup home directory

Hi Team,

I want to write a script which will take a backup of my home directory. But will only backup the changes made in files not whole home directory. I want to upload that on server. I don't have any idea. please help me.
# 2  
Old 12-05-2011
rsync?

Here's an extract from the man page on RHEL, which describes just what you want:

Code:
EXAMPLES
       Here are some examples of how I use rsync.

       To backup my wife's home directory, which consists of large MS Word files and mail folders, I use a cron job that runs

              rsync -Cavz . arvidsjaur:backup

# 3  
Old 12-05-2011
rdiff-backup

Hi, I'm using rdiff-backup with a crontab like this:
Code:
0 0 * * 2-6 /home/myuser/bin/home-rdiff-backup

this script is:
Code:
#!/bin/csh
/usr/local/bin/rdiff-backup --exclude /home/myuser/.cache --exclude /home/myuser/.thumbnails /home/myuser /export/home/RDIFF_BACKUP/Backup_mymachine_rdiff
/usr/local/bin/rdiff-backup --remove-older-than 2M --force /export/home/RDIFF_BACKUP/Backup_mymachine_rdiff
exit

------------------------------------------------------------
/export/home/RDIFF_BACKUP is a NFS. I remove all the backups older than 2 months.

Rdiff-backup use the rsync libraries and can do incremental backups, basically the same as rsync but with a "better" restore system. In order to have a graphical interface you can use JBackpack, it is a Java and it works in any system.

Last edited by Scott; 12-05-2011 at 07:18 AM.. Reason: Added code tags
This User Gave Thanks to hombreopaco For This Post:
# 4  
Old 12-05-2011
Never heard of it, but it seems perfect. Thanks Smilie

Code:
rdiff-backup.x86_64 : Convenient and transparent local/remote incremental mirror/backup

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies

2. UNIX for Dummies Questions & Answers

BackUp Home/Creating User from File

Hi! I want to test something to learn Shell scripting better. 1) How can I make a BackUp from all users and groups homedirectory? I want to save that backup in an archiv. Can I choose how to name the backUp archiv? 2) Ok I want to make a file like csv, in this file are listed Users.... (3 Replies)
Discussion started by: CommanderLinux
3 Replies

3. Solaris

Restricting SFTP user to a defined directory and home directory

Hi, I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP. The aim is to... (1 Reply)
Discussion started by: sftpuser
1 Replies

4. Programming

Getting Home Directory

Hi I need to get the home directory of current user who is running the program, also i need to store the value in a particular variable and pass to the function. thanks in advance (4 Replies)
Discussion started by: cutechaps
4 Replies

5. Shell Programming and Scripting

home directory

hello i want shell script. as root , i want to untar specific.tar.gz to all home user directory and after untar , there is 1.txt 2.txt ~~ 26.txt in/public_html/test1/ i want randomly selected 6 text files in 1.txt 2.txt ~26.txt to be renamed newword1.word , newword2.word , ~~... (8 Replies)
Discussion started by: topic32428285
8 Replies

6. Solaris

How to backup /home directories?

I know that how to backup the home directories in sun sparc server. Firstly, umount the filesystem, Secondly, fsck the filesystem, Thirdly, ufsdump the filesystem. Anybody know how to type the full command line backup the /home directory? (1 Reply)
Discussion started by: kingsan
1 Replies

7. Solaris

Automate to backup the /home directory

Can anybody know that how to automate backup the /home directory using the own shell script especially crontab job. How to script the code in starting process of the sun sparc server in /etc/init.d/ Thank's a lot. (1 Reply)
Discussion started by: kingsan
1 Replies

8. UNIX for Dummies Questions & Answers

cd into home directory ~

I'm trying to cd into a home directory with cd ~username_here and I'm getting the following error: ~username_here: does not exist The directory exists and I can directly go to it via cd /export/home/username_here without any problems. Any suggestions? (4 Replies)
Discussion started by: here2learn
4 Replies

9. UNIX for Dummies Questions & Answers

Need to write a home-grown backup script for Linux

I am researching ways in which to backup files or whole file systems for backup to another system. We are using Suse Linux 7.0 with no tape backup devices or secondary disks. What utilities would be the best to use for a simple yet flexible script for backup purposes? tar, cpio, compress. (3 Replies)
Discussion started by: darthur
3 Replies
Login or Register to Ask a Question