본문 바로가기
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

cd /volume2/XTRM_DSM/_VideoStation/

mkdir `date +%Y%m%d`

 

echo 사용자번호_사용자명 >> /volume2/XTRM_DSM/_VideoStation/`date +%Y%m%d`/사용자명_`date +%Y%m%d`.txt;

psql -U postgres -d video_metadata -c "select (select path from video_file where id =video_file_id) from watch_status where uid = 사용자번호" >> /volume2/XTRM_DSM/_VideoStation/`date +%Y%m%d`/사용자명_`date +%Y%m%d`.txt;

 

 

--------------------------

 

관리자 권한 : sudo -i

 

사용자 목록 : cat /etc/passwd

 

DB접근 : su postgres

 

DB선택 : psql video_metadata

 

명령어 : select (select path from video_file where id =video_file_id) from watch_status where uid = 1234;


  1. No Image

    psql -U postgres -d video_metadata -c "select (select path from video_file where id =video_file_id) from watch_status where uid=

    cd /volume2/XTRM_DSM/_VideoStation/ mkdir `date +%Y%m%d` echo 사용자번호_사용자명 >> /volume2/XTRM_DSM/_VideoStation/`date +%Y%m%d`/사용자명_`date +%Y%m%d`.txt; psql -U postgres -d video_metadata -c "select (select path from video_file where...
    Date2018.12.25 Category데이터베이스 Views235
    Read More
  2. No Image

    RSS Backup (Download Station RSS Backup script)

    pg_dump -U postgres download -t rss_feed -a -f /volume2/XTRM_DSM/rss_feed.sql
    Date2018.05.27 Category데이터베이스 Views183
    Read More
  3. No Image

    Download Station Auto Delete - content

    psql -U postgres -d download -c "delete FROM download_queue WHERE filename like '%[E Channel]%'" psql -U postgres -d download -c "delete FROM download_queue WHERE filename like '%[K Star]%'" psql -U postgres -d download -c "delete FROM downl...
    Date2018.02.11 Category데이터베이스 Views166
    Read More
  4. No Image

    Download Station Auto Delete

    su - postgres -c 'psql -U postgres -d download -c "delete from Download_queue where status in ('5','7','8','113','123')"'
    Date2018.02.11 Category데이터베이스 Views191
    Read More
Board Pagination Prev 1 Next
/ 1