Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Help needed with a Virtual server running Linux.

  1. #11
    Join Date
    Sep 2007
    Location
    Essex, England
    Posts
    806

    Default

    Looks good Swami. Thanks.

    Just ran through the 15 commands. All seem to work with the local web server to itself or a remote server.

    Is there one to rsync down to my laptop?
    Need a new website or update an old one? I'm your man!

    https://www.buildmeawebsite.uk/

  2. #12
    Join Date
    Sep 2007
    Location
    Essex, England
    Posts
    806

    Default

    James, I had Plesk on it as an interface, but they've switched is off
    Need a new website or update an old one? I'm your man!

    https://www.buildmeawebsite.uk/

  3. #13
    swamidog's Avatar
    swamidog is offline Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,837

    Default

    you will need to have an rsync client on your laptop. i don't know what OS you're running, so i can't help with that.

    the rsync client on your laptop will connect to ssh/rsync on the server to back things up. rsync is cool because it can handle file delta backups, but that's an exercise for another day.

    Quote Originally Posted by laserLips View Post
    Looks good Swami. Thanks.

    Just ran through the 15 commands. All seem to work with the local web server to itself or a remote server.

    Is there one to rsync down to my laptop?
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  4. #14
    Join Date
    Sep 2007
    Location
    Essex, England
    Posts
    806

    Default

    My brain is hurting...I wasn't made for this. :-( Someone give me chocolate....quick !!!!
    Need a new website or update an old one? I'm your man!

    https://www.buildmeawebsite.uk/

  5. #15
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    48

    Default

    Hi,

    If you have SSH root access, then you have two good options.
    They are a bit different and the result are also.

    One options is to make a copy of the whole partition and then later grab your files by mounting the image local.
    The partition backup over SSH is done with a combination of SSH, DD and piping.
    ssh root@123.45.67.89 "dd if=/dev/xvda " | dd of=/home/archive/linode.img
    (you of cause need to change parameters to fit your server and urls)

    The other option is file transfer over SSH. This can be done with scp. The syntax is something like: scp user@someserver:/path_to_file_or_dir localpath

    Hope that can help you on the way.

    Btw. your mysql is better of being backup'ed in textual form.
    You can do something like: mysqldump -u root -pPASSWORD --all-databases | gzip > /mnt/disk2/database_`data ' %m-%d-%Y'`.sql.gz
    That will give you an gz compressed file with all databases and tabels in your mysql server.
    Last edited by FutureDesign; 10-16-2013 at 23:52.
    Best regards
    Jan Thogersen

  6. #16
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Wow. That's some good stuff!

    I'm not sure I get the DD and piping thing.

    Is that how you make the whole virtual drive into an image file ... inside of the virtual hard drive?

    James.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  7. #17
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    48

    Default

    Quote Originally Posted by james View Post
    Wow. That's some good stuff!
    I'm not sure I get the DD and piping thing.
    It's bacis unix stuff :-D
    DD is a block copy mechanism in unix. It's part of the base.
    What happens is that SSH executes dd on the remote server. As dd is executed without destination, it outputs to stdout. ssh sends the stdout back to local terminal where it is piped (" | ") into another dd which this time does the opposite (stdin to file).
    Some speed may be gained by piping dd's output to gzip before it is sent via ssh.

    Quote Originally Posted by james View Post
    Is that how you make the whole virtual drive into an image file ... inside of the virtual hard drive?
    Don't know what you mean here...
    Last edited by FutureDesign; 10-17-2013 at 01:17.
    Best regards
    Jan Thogersen

  8. #18
    Join Date
    Mar 2006
    Posts
    2,478

    Default

    Most of that went over my head, but I knew of dd, and that IS the way to go I imagine. The lower the access you get, the better. Especially as the ISP has blocked that to outsiders. All higher level stuff needs more specific, and complex, systems, more chance of error. Low level is scary to many, but usually as simple as arithmetic, just triple check that what you ask it to do is right because it can be unforgiving of errors.

    As far as damaged data goes, it is usually easiest to shuttle good stuff into an empty location. Tough for active databases like forums, where the only way to keep up easily is frequent backups. Again, this is why simple low level works, it's usually the easiest thing to automate.

    Edit: James, for dd, think memcpy. Not same, exactly, but the simple crudeness of it is what makes it so good. dd can image entire slices/partitions/file systems like a 'forensic' image made by Ghost, and I assume that it can image a remote one too. Piping slightly unsettles me, seems to imply some kind of buffering not under direct control, but in the end it's a pipe, stuff comes out of it, or it doesn't.

    More edit: I only once used SCP, had barely heard of it, but I think it meant Secure Copy Protocol, and like other low level things is a 'does what it says on the tin' kind of tool, so good. When I had to use it, it was easy enough, it felt like secure FTP or FXP without the trimmings. I can't remember what tool I used, but it ran on W98, so presumably all of Win32.
    Last edited by The_Doctor; 10-17-2013 at 00:40.

  9. #19
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    48

    Default

    Quote Originally Posted by The_Doctor View Post
    Edit: James, for dd, think memcpy. Not same, exactly, but the simple crudeness of it is what makes it so good. dd can image entire slices/partitions/file systems like a 'forensic' image made by Ghost, and I assume that it can image a remote one too. Piping slightly unsettles me, seems to imply some kind of buffering not under direct control, but in the end it's a pipe, stuff comes out of it, or it doesn't.
    No need to be unsettled by piping. Piping is one of the things in unix that makes it wonderful and flexible. As you say, either data comes through or it doesn't. It's not like an RS232 cable were data can disappear :-)
    By the way, the piping is necessary, as it's not possible to dd from the same partition as writing the image to. It works, however the file system will be corrupt in the image. The correct way is to mount root as read only, and then dd through a ssh (pipe).

    Quote Originally Posted by The_Doctor View Post
    More edit: I only once used SCP, had barely heard of it, but I think it meant Secure Copy Protocol, and like other low level things is a 'does what it says on the tin' kind of tool, so good. When I had to use it, it was easy enough, it felt like secure FTP or FXP without the trimmings. I can't remember what tool I used, but it ran on W98, so presumably all of Win32.
    Winscp is the preferred choice. The cute thing with scp is that it uses the same mechanisms as SSH, so if you have SSH access you also have SCP access.
    Best regards
    Jan Thogersen

  10. #20
    Join Date
    Mar 2006
    Posts
    2,478

    Default

    Quote Originally Posted by FutureDesign View Post
    No need to be unsettled by piping. Piping is one of the things in unix that makes it wonderful and flexible. As you say, either data comes through or it doesn't. It's not like an RS232 cable were data can disappear :-)
    By the way, the piping is necessary, as it's not possible to dd from the same partition as writing the image to. It works, however the file system will be corrupt in the image. The correct way is to mount root as read only, and then dd through a ssh (pipe).
    They don't unsettle me that much. I used the word 'unsettle' partly for comedic effect. I think any weirdness I felt was purely a hangover from DOS that makes a distinction between redirection and piping. Redirection is totally basic (just dumps data immediately to where it's pointed to), but piping seems closer to streaming, i.e. implications of timing and buffering in some operations. Not really unsettling though, I use things called Virtual Audio Cable or MIDIyoke at times. Those definitely DO pipe their stuff using buffers. And I like RS-232. A lot.


    Winscp is the preferred choice. The cute thing with scp is that it uses the same mechanisms as SSH, so if you have SSH access you also have SCP access.
    Thanks, that was definitely the one. I can't find it locally here, I'll get it again before I forget, in case I ever need it. (Strangely, I did find a local copy of its INI file with a name I could only have made myself!)

    EDIT:
    Jan, do you know offhand which is the latest one that runs on W98, or the latest that does not need dotNET? Trawling through the history doesn't look like the fastest way to find out.. Part of the INI file I found has substring 'Winscp382, and a 3.8.2. exists as a safe bet, but maybe W98 dotNET-less support ran longer and later?
    Last edited by The_Doctor; 10-17-2013 at 02:56.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •