Re ext hdd

Joseph Sinclair plug-discussion at stcaz.net
Sat Jul 16 21:40:22 MST 2011


rsync will treat each dir as a separate backup; you'll want to rotate to new directories only when you want to move to a new backup (e.g. each month or so).

The filesystem on the destination does not have to match the filesystem on the source (so it's OK to have ext3 on your homedir and back that up to XFS).

The main backup dir would be the directory that contains all the rotating backup directories.
e.g. (MyBackups is the main backup directory in this example)
/media/backup_disk
+
 | MyBackups
 |+
   | 20110716T190000
   | 20110816T190000
   | 20110916T190000
   | 20111016T190000

That way you use rsync to keep a current backup in the latest directory and every so often (perhaps monthly) you start a new directory.

The first backup in each directory takes a while (consider that a "full backup") while it only takes a few minutes to update each (e.g.) day until the next full backup.

That way you have a longer backup window (several months) when you can recover something lost or accidentally deleted.

I don't know the details of your current process, so I'm basing this off of your description of what you had planned to do with partitions.

The command to make each monthly directory would look something like this:
  mkdir -p /media/backup_disk/MyBackups/$(date '+%Y%m%dT%H%M')
or this if you don't want the time in the directory name:
  mkdir -p /media/backup_disk/MyBackups/$(date '+%Y%m%d')


On 07/16/2011 08:44 PM, betty wrote:
> Thanks, your response -  was very clear. only thing i'm not sure about is the naming a "main back up directory".
> so does that mean that after i format it for ext4 or xfs that  i make a dir. called
>> /media/backup_disk/MyBackups/20110716T190000/).
> ?
> then on subsequent back ups i name them for example
>> /media/backup_disk/MyBackups/20110816T190000/).(note month change)
> what prevents rsync from thinking that this is a whole new dir? I guess i'm not clear on what a 'main backup dir' is.
> 
> can i use xfs as the format if my current home dir is on ext3 or 4?
> Thanks,
> betty i
> 
> 
> 
> On 07/16/2011 07:48 PM, Joseph Sinclair wrote:
>> For backup, you can rsync to a directory named for the date under a main backup directory (e.g. /media/backup_disk/MyBackups/20110716T190000/).
>> This has several advantages over using a lot of small partitions:
>>    1) Using different directories on a single partition makes it easier to manage all the data (plus you don't hit the limits on the number of partitions permitted on a device).
>>    2) It avoids the problem of figuring out which partition to mount for a backup without mounting them all and searching through the contents.
>>    3) It makes rotation simpler (just delete anything more than X days old after a backup if the disk is getting more than Y% full).
>>    4) With the right directory names (like the example above) you can find the most recent backup easily as well.
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20110716/2a9f3fc0/attachment.pgp>


More information about the PLUG-discuss mailing list