Jump to content

Backup


somethingx
 Share

Recommended Posts

I have (or will have soon) one PC with Windows XP and another PC with Linux.

They are connected to a router.

I want to backup files from the first PC on the second PC and vice versa.

I am not going to use these files (hopefully), just store them.

Do I need to use Samba for this or is there another way?

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 weeks later...
Guest dianat100
Yes, so what you should do is tar the files (and gzip or bzip them to save space). When you extract the archive again on a Linux machine the permissions etc will be restored.

 

Newbie asks: How do I actually tar the files I want to back up (and then gzip or bzip them to save space)?

 

Thanks.

Link to comment
Share on other sites

Here's what I use for general backups:

 

I have a file called backup.list containing a list of the folders to back up, one per line, e.g.

/home/chris

/root

/etc

 

Another called exclude_from_backup.list containing a list of subfolders and files to exclude, e.g.

/home/chris/backup/*

/home/chris/downloads/*

/home/chris/temp/*

/home/chris/.kde/share/fonts/*

/home/chris/.kde/share/cache/*

*~*

core*

This is some of it - you will want to add more...

 

Then a file called backup.sh containing the tar command:

 

#!/bin/sh
tar -cvzV `date +%Y_%m_%d_%H:%M:%S` -f backup.tar.gz --files-from=/home/chris/backup/backup.list -X/home/chris/backup/excludefrombackup.list

 

This needs to be executeable, so

chmod 775 /home/chris/backup/backup.sh

I get an error message when the backup finishes, but it seems to work OK - must look at it closer sometime...

 

All stored in /home/chris/backup/

 

Run as root (so you can back up any file) by typing /home/chris/backup/backup.sh and it should write a nice big backup.tar.gz file to /home/chris/backup/ which I then copy to another PC or CD.

 

Works for me...

 

Chris

Edited by streeter
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...