Results 1 to 4 of 4
  1. #1

    How can I zip one file with Shell and move it

    Hi
    I have a question ...
    How can I zip one file with Shell and move it to another account on the same server.

    also,
    how can I copy a database from one account to another one on
    the same server.


    thank you.

  2. #2
    Join Date
    Jun 2004
    Location
    Ann Arbor, MI
    Posts
    119
    If you're only moving one file, you shouldn't need to zip it...just move it from one account to the other:

    mv /path/to/file.ext /path/to/new/account/file.ext

    If the new account has a different owner than the one you're moving it from, make sure to chown the file to the new account user.

    As for the database, you could either use a tool like phpmyadmin to export the database and then use it again to import that file to the new database, or you could do it on command line:

    mysqldump -Q --opt -u username -p databasename > backup.sql

    to export it to a file named backup.sql

    mysql -u username -p newdatabase < backup.sql

    to import it to the new database.
    Greg Swaney [gswaney - at - nexcess.net]
    NEXCESS.NET Internet Solutions [Detroit DC]
    EliteRAX ● Dedicated Servers, Clusters & Co-location
    MaxVPS ● Virtual Private & Virtual Dedicated Servers

  3. #3
    Thank you "NEXCS-Greg"

    that was VERY helpful ...
    many thanks for your help.

  4. #4
    Join Date
    Jun 2004
    Location
    Ann Arbor, MI
    Posts
    119
    You're welcome!
    Greg Swaney [gswaney - at - nexcess.net]
    NEXCESS.NET Internet Solutions [Detroit DC]
    EliteRAX ● Dedicated Servers, Clusters & Co-location
    MaxVPS ● Virtual Private & Virtual Dedicated Servers

Posting Permissions

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