Worth remembering: Difference between revisions

From Wurst-Wasser.net
Jump to navigation Jump to search
(Created page with "# vi(m) ## ~/.vimrc set number set tabstop=4 set shiftwidth=4 ## Append to your files # vim:tabstop=4:shiftwidth=4:autoindent # Instead of rsync Copying a remote folder to a local disk: ssh root@OLDSYSTEM "cd /; tar cf - etc" |tar xvf - Creating a local tar from a remote folder: ssh dtr tar czf - /mnt/boot > mnt_boot.tgz Optional: --one-file-system # not sure this is correct, maybe try this: ssh dtr tar czf --exclude /mnt/var --exclude /mnt/boot - /mnt > mnt...")
 
No edit summary
Line 1: Line 1:
# [[vi]](m)
= [[vi]](m) =
## ~/.vimrc
== ~/.vimrc ==
  set number
  set number
  set tabstop=4
  set tabstop=4
  set shiftwidth=4
  set shiftwidth=4


## Append to your files
== Append to your files==
  # vim:tabstop=4:shiftwidth=4:autoindent
  # vim:tabstop=4:shiftwidth=4:autoindent


# Instead of rsync
= Instead of rsync =
Copying a remote folder to a local disk:
Copying a remote folder to a local disk:
  ssh root@OLDSYSTEM "cd /; tar cf - etc" |tar xvf -
  ssh root@OLDSYSTEM "cd /; tar cf - etc" |tar xvf -

Revision as of 18:13, 14 June 2023

vi(m)

~/.vimrc

set number
set tabstop=4
set shiftwidth=4

Append to your files

# vim:tabstop=4:shiftwidth=4:autoindent

Instead of rsync

Copying a remote folder to a local disk:

ssh root@OLDSYSTEM "cd /; tar cf - etc" |tar xvf -

Creating a local tar from a remote folder:

ssh dtr tar czf - /mnt/boot > mnt_boot.tgz

Optional: --one-file-system # not sure this is correct, maybe try this:

ssh dtr tar czf --exclude /mnt/var --exclude /mnt/boot - /mnt > mnt_root.tgz

Creating a local dump from a remote folder:

ssh dtr "/sbin/dump -0a -b 256 -z9 -f - /dev/sdc3" > mnt_root.dump