I decided to do some backups, and that was good to remember some tools options that I did not remember:

To copy with rsync:
rsync -va /source-dir /target-dir

each time you run this command, rsync copies only the modified files

-v verbose
-a archive (recursive, permissions, ownership)

To compare if a copy was successful:

diff -sqr –speed-large-files /source-dir /target-dir

-s: report identical files
-q: only tells if the files differ

-r: recursive

While formatting the external hard-drive for the backup, some tips:

mkfs.ext3 -c -m 0 /dev/sdb1

-c to check for badblocks, after all you don’t want to discover that when you need your backups

-m 0 reserves no space for the super-user. That is useful for storage partitions, such as /home or backup devices. By default, mkfs reservers 5% of the filesystem space to the superuser as a security reason. So, if the partition lacks space, this superuser area is used by daemons to keep the system running. This means that this option is important for root filesystems. In a 230GB partition, using -m 0 gives about more 13GB of storage.

1 thought on “Backups

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s