>You've been tasked with moving the root filesystem from a server
>All the higher ups are watching you
>This happens
There is no backup. How do you fix this and keep your job?
>You've been tasked with moving the root filesystem from a server
>All the higher ups are watching you
>This happens
There is no backup. How do you fix this and keep your job?
>no backup
>not doing cp then rm
you deserve to lose the job
I wouldn't get in that situation. Copy, verify, and then delete the original.
dude use git to manage your system haha
my os is on github i update it every night i can just roll back to whatever I like.
>my os is on github
what
/thread
git add -A in /
i can push, pull, checkout.
would have solve op problem of being a moron becuz he could just clone his os on the new machine and run bootloader.
kek, serves gitcuck right
Linux newfag here, could you use rsync for something like this? Seems like a pretty cool utility
Doing the Lord's job, user. I like you.
Sure. Linux is just a collection of files in predetermined locations. One of the oldest ways to install Linux is to prepare a disk, dump a base system on it then install a bootloader. Gentoo still works along these lines. rsync's biggest advantage is that it avoids copying files existing on the remote, which would be useful if the transfer was interrupted.
I actually do this at work infrequently when re-purposing boxes. Although I just use dd.
dd if=/dev/sda2 | gzip | ssh user@host "cat - > /tmp/sda2.gz".
>keeping your entire enterprise's system on someone else's server, without any protection or even choosing what to store in the cloud
Good idea.
>dding the whole filesystem
Do you have tiny partitions? Or endless patience?
I need to learn rsync one of these days
/thred
always redundancy
>Putty
>useless use of dd
Provided your disks aren't mostly empty and have seen years of use, it'll beat a filesystem-level copy most times since it's mostly one long sequential read and doesn't really need to deal with the location of files on disk.
Is it? I'm not attached to using dd, it's just a method that has worked for us for years now. If there's a better way, post it.
gzip < /dev/sda2 | ssh whatever 'cat > sda2.gz'
DD is not a tool for writing disks or devices, it's just a fancier cat.
Cool - how does does it handle read errors? Typically we're replacing disks because they've been flagged up for smart failures in monitoring.
dd keeps the fragmentation though?
a software level copy reorganizes, yes?
How is it my fault that some retard decides to use the system during a transfer?
>reposting from reddit
get out
>windows
lmao
>Windows
Lmao very hard
this, saw op pic like a week ago kek
Ignore the gzip tard, you do need to adjust the blocksize that dd is reading to like 4k though, else it will just keep reading the same shit over and over and slow your transfer way down.
dd is bad to use on ssds right?
>There is no backup.
i'd be a pretty shitty sysadmin if I had no backup. Or at least a snapshot of a VM I could roll back to, or something of the sort.