[nmglug] Backups

a a at kaluta.us
Sat May 16 16:38:01 PDT 2015


i am planning to reload the ubuntu 12.04 lts due to possible corruption. 
I have used rsync to create a home partition

sudo  mkdir  /media/home
sudo  mount  -a
sudo  rsync-aXS  /home/./media/home/.
cd  /
sudo  mv  /home/home_backup
sudo  mkdir  /home
I have a backup copy in /media/8F5F-FD13

a at a-laptop:~$ sudo rsync /home_backup/home/a/  /media/a /8F5F-ED13/
[sudo] password for a:
skipping directory .
skipping directory a
a at a-laptop:~$ cd /
a at a-laptop:/$ cd /
a at a-laptop:/$ sudo rsync /home_backup/home/a/  /media/a /8F5F-ED13/
skipping directory .
skipping directory a
a at a-laptop:/$ sudo rsync /home_backup/home/  /media/a /8F5F-ED13/
skipping directory .
skipping directory a
/dev/sdb
it is not transfering to the usb stick which is /dev/sdba

@a-laptop:~$ blkid
/dev/sda1: UUID="81a9a7f1-32c7-41e6-a5ed-e626c4d3a1c3" TYPE="ext4"
/dev/sda3: UUID="8c3b8759-76c0-40ed-9cb3-e8641fac818c" TYPE="ext4"
/dev/sda5: UUID="449ae967-f8bf-4ea5-98d9-09407fb8f269" TYPE="swap"
/dev/sdb1: SEC_TYPE="msdos" UUID="8F5F-ED13" TYPE="vfat"

could it be that the usb stick is vfat although aptik has transferred several back up files to the usb stick.
or my coding errors?





On 05/16/2015 11:28 AM, J. Marsden DeLapp wrote:
> On Fri, 15 May 2015 17:20:37 -0600
> a <a at kaluta.us> wrote:
>
>> can you give me an idea of the corrected code  there a few mail
>> directories I wish to save.would saving these be sufficient to
>> transfer contents to new reload?
> I like to use rsync for backups. cp -a is good for a file or two. rsync
> is way better to backup up directories. And rsync works well for
> restoring from backups.;
>
> Here is a simple example
>
> First I do a dry run to see what will happen, especially important when
> using --delete.
> rsync -havn /home/me/ /backup/home/me/ --delete --exclude=*.iso
>
> Then get rid of the n option to actually do it.
> rsync -hav /home/me/ /backup/home/me/ --delete --exclude=*.iso
>
>
> And for extra credit, here is a more complex example from a backup
> script file.
>
> rsync -hav  $task $dest$task --backup --backup-dir=$bkupdest$task
> --exclude-from=$whatnottobackup --delete --one-file-system
> --numeric-ids --delete-excluded
>
> Where $task is something like
> /etc/
> /home/me/
> /var/www/
>
> $dest$task is something like
> /backup/hostname/current/etc/
>
> $bkupdest$task is something like
> /backup/hostname/2015-05/16/etc/
>
> $whatnottobackup is a file that includes things like
> #exclude.txt file
> *.SV$
> *.bak
> *.iso
> /var/cache/apt/archives
> Trash/
> trash/
>
>
> Mars
>



More information about the nmglug mailing list